Image pickup device, automatic focusing method, automatic exposure method, electronic flash control method and computer program

ABSTRACT

An image pickup device provided with an automatic focusing function includes an image pickup unit, a face detection unit, a receive unit, and an automatic focusing control unit. The image pickup unit is configured to input image data corresponding to a subject. The face detection unit is configured to separately detect eyes, a nose, and a mouth of a human face from the image data input from the image pickup unit. The receive unit is configured to receive from a user a selection of any one of the eyes, the nose, or the mouth as a ranging area. The automatic focusing control unit is configured to perform automatic focusing control based on the ranging area selected by the user.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. application Ser.No. 11/745,703, filed May 8, 2007 now U.S. Pat. No. 7,903,163, which isa continuation of U.S. application Ser. No. 10/244,670, filed Sep. 17,2002, now U.S. Pat. No. 7,298,412, issued Nov. 20, 2007. Thisapplication is based upon and claims the benefit of priority from priorJapanese Patent Application Nos. 2001-284162 filed Sep. 18, 2001,2001-284163 filed Sep. 18, 2001, 2001-304342 filed Sep. 28, 2001,2001-304343 filed Sep. 28, 2001, and 2001-304638 filed Sep. 28, 2001.The entire contents of each of these documents are incorporated hereinby reference.

BACKGROUND OF THE INVENTION

1) Field of the Invention

The present invention relates to an image pickup device, an automaticfocusing method, an automatic exposure method, an electronic flashcontrol method and a computer program, which have a face detectionfunction for detecting a face of a subject.

2) Description of the Related Art

Recently, with a development of personal computers, use of digitalcameras has become popular as image input devices thereof. Particularly,in many cases, photographers who do not have special techniques usedigital cameras. Therefore, in many digital cameras, the shutter speed,exposure and focusing are automatically set, matched with a subject, inorder to avoid a failure in taking a picture. In many cases, the subjectfor photographing is generally a human object. However, there has notbeen proposed a digital camera, which specially has a setting modepeculiar to human objects. It is a main object of the present inventionto photograph a human object appropriately.

In order to always take a picture, which is in focus, while manuallyperforming focus adjustment of the subject, the distance of which fromthe camera changes every moment, skilled camera work technique isrequired. Therefore, an automatic focusing function has been developed,so that even nonprofessionals can always photograph an image, which isin focus. In an image pickup device, which has a conventional automaticfocusing function, it is common to perform automatic focusing,designating one or a plurality of areas in the center of a screen as aranging area. In the above ranging method, however, when a human objectis photographed, it is necessary to perform automatic focusing in acomposition in which the human object and the ranging area areoverlapped on each other, and after the focus is adjusted, to change thecomposition to a desired composition and photograph. Hence, there is aproblem in that it takes time to photograph, with a human object beingin focus.

As a technique for determining exposure with a conventional image pickupdevice such as a digital camera, there are used, (1) a multifractionatedphotometric method in which a photometric range in a screen is dividedinto a plurality of photometric areas, and exposure is determined fromthe photometric result of each photometric area, (2) a center-weightedphotometric method in which optical intensity is measured by givingweight to the center of the screen, (3) a partial photometric method inwhich optical intensity is measured in only several tens % of the centerof the screen, and (4) a spot photometric method in which opticalintensity is measured in only several % of the center of the screen.

With the conventional photometric methods of (1) to (4), however, thereis a problem in that a human object is not always exposed properly. Morespecifically, in the multifractionated photometric method (1), since theexposure is controlled so that the whole screen is exposed properly,there is a problem in that a human object in the screen may not beexposed properly. With the center-weighted photometric method (2), thepartial photometric method (3) and the spot photometric method (4), ahuman object is exposed properly, only when the photometric area agreeswith the position of the human object.

Further, when a color photograph is to be taken, using an electronicflash device, a so-called red-eye phenomenon may occur, in which humaneyes appear red or gold. Such red-eye phenomenon occurs because flash oflight of a light emitter of an electronic flashing device, which haspassed through the pupil of the eye, is reflected by the retinalportion, and the reflected light is revealed in the film. Morespecifically, many capillary vessels exist in the retinal portion of theeye, and hemoglobin in the blood is red, and hence the reflected lightthereof appears reddish. In order to prevent the red-eye phenomenon,there has been heretofore known a technique in which after light forpreventing the red-eye phenomenon is emitted so as to reduce the size ofthe pupil of a human object, the main light emission is performed.

With a camera having a conventional electronic flash device, however,there are various problems described below. Firstly, there is such aproblem that when a close-up of a face is to be shot, a place where theelectronic flash light is strongly irradiated, such as forehead,reflects the electronic flash light, thereby causing blanking. Secondly,there is such a problem that since backlight judgment has been carriedout by a difference between the brightness in the central portion of thescreen and the ambient brightness, when a human object is not in themiddle of the screen in the backlight situation, automatic electronicflashing for correcting the backlight is not performed, and it isnecessary to switch to a forced emission mode in order to emitelectronic flash light. Thirdly, there is such a problem that in orderto prevent the red-eye phenomenon and blanking due to the electronicflash light, a user has to carry out red-eye mode switchover and a weaklight emitting operation of the electronic flash.

In Japanese Patent Application Laid-Open No. 2001-51338, there isdisclosed a camera in which the direction of the face of a subject canbe recognized, and when the face turns to a predetermined direction, thesubject recording operation can be performed. This camera has, a fieldimage detection unit which detects image information of a field, a facerecognition unit which recognizes the face of a subject, based on theimage information from the field image detection unit, a judgment unitwhich judges whether the face is turning to a predetermined directionbased on the information from the face recognition unit, and a controlunit which allows to perform the subject recording operation accordingto the judgment result of the judgment unit.

However, with the image pickup device such as a digital camera,comprising a mode in which the shutter speed, exposure and focusing areautomatically set depending on a subject, pushing of a release button tophotograph the subject depends on the photographer's intention.Therefore, when a human object is to be photographed, even if thephotographer recognizes the human object, the release timing may beshifted, thereby losing the photographing chance. In Japanese PatentApplication Laid-Open No. 2001-51338, such a technique is used that thedirection of the face is recognized, and when the face turns to apredetermined direction, the subject recording operation is performed.Therefore, if the human object moves or the camera is blurred, the facemay not be photographed clearly.

In Japanese Patent Application Laid-Open No. H10-334213, there isdisclosed a technique in which a face image of a target human objectimage is automatically recognized from color image data including thehuman object image, without being affected by the photographingbackground and illuminance, and an area corresponding to the size of theface image is cut out. According to this technique, the cameracomprises, an image acquiring CPU which acquires a color image includinga human object image, a color liquid crystal display section fordisplaying the acquired color image on a screen, a face recognitioncolor memory which preliminarily stores a plurality of face recognitioncolor data for recognizing a face image of the human object image fromthe color image, a recognition instructing section which instructsimplementation of face image recognition processing, a face imagerecognizing CPU which compares color data in the entire color image areawith the face recognition color data, in response to the instruction ofimplementation of the image recognition processing, to thereby recognizean area of color data which agrees with any of the face recognitioncolor data as a face image, an area designator which designates an areato be cut out of the recognized face image, a frame forming CPU whichforms a frame for the area corresponding to the size of the face image,in response to the designation of the cutout area, and a face imagecutout CPU which cuts out the face image of an area enclosed by theframe.

However, when a photograph for certificate is taken, there has beenheretofore such a problem that the face in the photographed imageapproaches left or right, or up or down, or inclines. When the faceinclines, an operator has to specify the cutout position manually,watching the image, or specify the position of the face, thereby makingthe operation troublesome. Further, Japanese Patent ApplicationLaid-Open No. H10-334213 is for automatically recognizing the face imageof a target human object image from color image data including the humanobject image, without being affected by the photographing background andilluminance, and cutting out the area corresponding to the size of theface image. Hence, it is not taken into consideration to correct thebalance of the size to be cut out or an inclination of the image.

SUMMARY OF THE INVENTION

It is a primary object of this invention to provide an image pickupdevice and an automatic focusing method, which can bring a human face ina screen into focus, regardless of the position and range of the humanobject in the screen, and photograph the human object without changingthe is composition between at the time of automatic focusing and at thetime of photographing, and a program for a computer to execute themethod.

And it is a second object of this invention to provide an image pickupdevice and an automatic exposure method, which can properly expose ahuman object, regardless of the position and range of the human objectin the screen, and a program for a computer to execute the method.

And it is a third object of this invention to provide an image pickupdevice and an electronic flash control method, which can automaticallyjudge whether a human object is to be photographed, without troublingthe user, and can automatically emit light suitable for the human objectphotographing, and a program for a computer to execute the method.

And it is a fourth object of this invention to provide an image pickupdevice, in which a release button is automatically pushed by recognizingand judging a face image, thereby enabling recording only a clear image,and preventing photographing an unclear image, without losing a shutterchance.

And it is a fifth object of this invention to provide an image pickupdevice, in which a face image can be cut out, with the size andinclination being automatically corrected, by recognizing and judgingthe face image, and stored as another image file.

According to one aspect of the invention, there is provided an imagepickup device provided with an automatic focusing function, comprising,an image pickup unit which inputs image data corresponding to a subject,a face detection unit which detects a human face from the image datainput from the image pickup unit, and an automatic focusing control unitwhich performs automatic focusing control, designating at least a partof the human face detected by the face detection unit as a ranging area.

According to one aspect of the invention, there is provided an automaticfocusing method comprising, an image input step of inputting image datacorresponding to a subject, a face detection step of detecting a humanface from the image data input at the image input step, and an automaticfocusing control step of performing automatic focusing control,designating at least a part of the human face detected at the facedetection step as a ranging area.

According to one aspect of the invention, there is provided a programfor a computer to execute, an image input step of inputting image datacorresponding to a subject, a face detection step of detecting a humanface from the image data input at the image input step, and an automaticfocusing control step of performing automatic focusing control,designating at least a part of the human face detected at the facedetection step as a ranging area.

According to one aspect of the invention, there is provided an imagepickup device provided with an automatic exposure function, comprising,an image pickup unit which inputs image data corresponding to a subject,a face detection unit which detects a human face from the image datainput from the image pickup unit, a photometric unit which measuresoptical intensity, designating the human face detected by the facedetection unit as a photometric area, and an exposure control unit whichcalculates the exposure based on the photometric result of the humanface by the photometric unit, and performs exposure control based on thecalculated exposure.

According to one aspect of the invention, there is provided an automaticexposure method comprising, an image input step of inputting image datacorresponding to a subject, a face detection step of detecting a humanface from the image data input at the image input step, a photometricstep of measuring optical intensity, designating the human face detectedat the face detection step as a photometric area, and an exposurecontrol step of calculating the exposure based on the photometric resultof the human face at the photometric step, and performs exposure controlbased on the calculated exposure.

According to one aspect of the invention, there is provided a programfor a computer to execute, an image input step of inputting image datacorresponding to a subject, a face detection step of detecting a humanface from the image data input at the image input step, a photometricstep of measuring optical intensity, designating the human face detectedat the face detection step as a photometric area and an exposure controlstep of calculating the exposure based on the photometric result of thehuman face at the photometric step, and performing exposure controlbased on the calculated exposure.

According to one aspect of the invention, there is provided an imagepickup device provided with an electronic flash function, comprising, animage pickup unit which inputs image data corresponding to a subject, aface detection unit which detects a human face from the image data inputfrom the image pickup unit, an electronic flashing unit for emittingelectronic flash light, and an electronic flash control unit whichcontrols the electronic flashing unit based on the detection result ofthe human face by the face detection unit.

According to one aspect of the invention, there is provided anelectronic flash control method comprising, an image input step ofinputting image data corresponding to a subject, a face detection stepof detecting a human face from the image data input by the image pickupunit and an electronic flash control step of controlling the electronicflashing unit for emitting the electronic flash light, based on thedetection result of a human face at the face detection step.

According to one aspect of the invention, there is provided a programfor a computer to execute, an image input step of inputting image datacorresponding to a subject, a face detection step of detecting a humanface from the image data input by the image pickup unit, and anelectronic flash control step of controlling the electronic flashingunit for emitting the electronic flash light, based on the detectionresult of a human face at the face detection step.

According to one aspect of the invention, there is provided an imagepickup device comprising, an image pickup unit which converts an opticalimage of a subject to image data and outputs this image data, a faceimage recognition unit which recognizes face image from the image data,and a face portion judgment unit which judges each portion in the faceimage recognized by the face image recognition unit, wherein when eachportion in the face image can all be judged by the face portion judgmentunit, a release button for executing photographing of the subject isautomatically pressed, or the photographing operation is executed.

According to one aspect of the invention, there is provided an imagepickup device comprising, an image pickup unit which converts a subjectimage to image data and outputs this image data, and a face imagerecognition unit which recognizes face image from the image data,wherein when the face image is recognized by the face image recognitionunit, the face image portion is cut out and stored as a separate imagefile.

These and other objects, features and advantages of the presentinvention are specifically set forth in or will become apparent from thefollowing detailed descriptions of the invention when read inconjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram which shows an appearance of a digital cameraaccording to a first embodiment;

FIG. 2 is a block diagram which shows a configuration of the digitalcamera according to the first embodiment;

FIG. 3 is a diagram which shows a user setup screen for recordingconditions displayed on a liquid crystal monitor, when a SETUP mode isselected by a mode changing switch in an operation section in thedigital camera according to the first embodiment;

FIG. 4 is a flowchart which explains a first example of the AFoperation;

FIG. 5 is a diagram (1) which shows a display example on the liquidcrystal monitor;

FIG. 6 is a diagram (2) which shows a display example on the liquidcrystal monitor;

FIG. 7 is a diagram which shows a user setup screen for recordingconditions displayed on a liquid crystal monitor, when a SETUP mode isselected by a mode changing switch in an operation section according toa second example;

FIG. 8 is a flowchart which explains the second example of the AFoperation;

FIG. 9 is a diagram which shows a display example on the liquid crystalmonitor;

FIG. 10 is a diagram which shows a user setup screen for recordingconditions displayed on a liquid crystal monitor, when a SETUP mode isselected by a mode changing switch in an operation section in thedigital camera according to the second embodiment;

FIG. 11 is a diagram which shows a user setup screen for recordingconditions displayed on the liquid crystal monitor, when the SETUP modeis selected by the mode changing switch in the operation section in adigital camera according to a second embodiment;

FIG. 12 is a diagram which explains the AE operation;

FIG. 13 is a diagram which explains the AE operation;

FIG. 14 is a flowchart which explains the first example of the AEoperation;

FIG. 15 is a diagram which shows a display example on the liquid crystalmonitor;

FIG. 16 is a diagram which shows a display example on a sub-LCD;

FIG. 17 is a diagram which shows a display example on the liquid crystalmonitor of a digital camera;

FIG. 18 is a flowchart which explains the second example of the AEoperation;

FIG. 19 is a diagram which shows a display example on the liquid crystalmonitor;

FIG. 20 is a diagram which shows a user setup screen for recordingconditions displayed on a liquid crystal monitor, when a SETUP mode isselected by a mode changing switch in an operation section in a digitalcamera according to a third embodiment;

FIG. 21 is a block diagram which shows a detailed configuration of anelectronic flash circuit in FIG. 2;

FIG. 22 is a flowchart which explains electronic flashing operation;

FIG. 23 is a diagram which shows a display example on the liquid crystalmonitor;

FIG. 24 is a diagram which shows a display example on the liquid crystalmonitor;

FIG. 25 is a block diagram which shows a digital camera according to afourth embodiment;

FIG. 26 is a schematic block diagram which shows a face recognitionprocessor in the digital camera in the first embodiment;

FIG. 27 is a flowchart which explains the first example;

FIG. 28 is a flowchart which explains the second example;

FIG. 29 is a flowchart which explains a third example;

FIG. 30 is a flowchart which explains a fourth example;

FIG. 31 is a flowchart which explains a fifth example;

FIG. 32 is a schematic block diagram which shows a face recognitionprocessor in a digital camera in a fifth embodiment;

FIG. 33 is a flowchart which explains the operation of the digitalcamera according to the fifth embodiment;

FIG. 34 is a diagram (1) which explains a face image;

FIG. 35 is a diagram (2) which explains the face image; and

FIG. 36 is a diagram (3) which explains the face image;

DETAILED DESCRIPTIONS

Preferred embodiments of a digital camera, which employs a image pickupdevice, an automatic focusing method, an automatic exposure method, anelectronic flash control method and a program to be executed by acomputer, will be explained in detail, in order of (a first embodiment),(a second embodiment), (a third embodiment), (a fourth embodiment) and(a fifth embodiment). The components, kinds, combinations, shapes andrelative arrangements thereof described in each embodiment are notintended to limit the scope of the invention, and are only explanationexamples, unless otherwise specified.

First Embodiment

A digital camera according to a first embodiment will be explained withreference to FIG. 1 to FIG. 9. In the first embodiment, a digital camerawhich can bring a human face in a screen into focus, regardless of theposition and range of the human object in the screen, and photograph thehuman object without changing the composition between at the time ofautomatic focusing and at the time of photographing will be explained.

FIG. 1 is a block diagram which shows an appearance of a digital cameraaccording to the first embodiment, in which FIG. 1A shows a frontelevation, FIG. 1B shows a side view, and FIG. 1C shows a top view. FIG.1 shows a state that an upper lid is opened. In this figure, referencenumber 201 denotes a camera body, 202 denotes an image pickup lens, 203denotes an electronic flash unit, 204 denotes a viewfinder, 205 denotesthe upper lid provided so as to be opened or closed, 206 denotes a hingethat supports the upper lid 205 so as to be opened or closed, 207denotes a liquid crystal monitor provided inside of the upper lid 205,208 denotes a sub-LCD provided outside of the upper lid 205, 209 denotesan upper lid open/close detection switch for detecting whether the upperlid 205 is opened or closed, 210 denotes a barrier opening/closing knob,211 denotes a release switch for instructing operation such asphotographing, 212 denotes a mode changing switch for selecting eachmode, 213 denotes an electronic flash switch for performing electronicflashing, 214 denotes an image quality mode switch for settingphotographing image quality, 215 denotes a cursor key, 216 denotes aDATE switch for inputting date, 217 denotes an ENTER key, and 218denotes a SELECT key.

The mode changing switch 212 is for selecting, (1) a SETUP mode forchanging or confirming the setting of the camera, (2) a still picturemode for recording a still picture, (3) a motion picture mode forrecording a motion picture, (4) a reproduction mode for reproducing arecorded file, (5) a PC mode for sending a file to a personal computeror operating the camera from the personal computer, by connecting thecamera to the personal computer, and (6) a communication mode forcommunicating via a network.

FIG. 2 is a block diagram which shows a configuration of the digitalcamera according to the first embodiment. The digital camera shown inthis figure comprises, image pickup lenses 202 (zoom lens 202 a, focuslens 202 b), a mechanical mechanism (a mechanical shutter, a diaphragm,a filter, etc.) 101, a CCD 102, F/E (a CDS circuit, an AGC circuit andA/D conversion circuit) 103, an IPP 104, a compression/expansion circuit105, a memory card 106, a DRAM 107, a liquid crystal monitor 207, asub-LCD 208, an operation section 108, motors (a zoom lens motor 109 a,a focus motor 109 b, a diaphragm/shutter motor 109 c) 109, drivers (azoom driver 110 a, a focus driver 110 b, a diaphragm/shutter driver 110c) 110, an SG 111, a battery 112, a DC/DC converter 113, an AC adapter114, a controller (CPU 115 a, a FLASH_ROM 115 b, an SD_RAM 115 c) 115, acommunication driver section 116, a network communicator 117 and anelectronic flash unit 203.

The image pickup lens 202 is for forming an image of a subject, andcomprises a zoom lens 202 a for realizing a zoom function, and a focuslens 2 b for bringing the subject into focus. The mechanical mechanism101 comprises a mechanical shutter, a diaphragm for adjusting thebrightness of the subject, a filter and the like. The CCD 102 convertsthe subject image formed by the image pickup lens 202 into an electricsignal, and outputs the signal as analog image data to the F/E 103.

The F/E 103 is for performing preprocessing with respect to the analogimage data input from the CCD 102, and comprises a CDS circuit forperforming correlated double sampling of the analog image data inputfrom the CCD 102, an AGC circuit for adjusting the gain of the analogimage data output from the CDS circuit, and an A/D conversion circuitfor performing A/D conversion with respect to the analog image dataoutput from the AGC circuit and outputting the digital image data to theIPP 104.

The IPP 104 is for performing various image processing with respect tothe input image data, and for example, after performing interpolationprocessing with respect to the color image data input from the F/E 103,it converts the color image data to YUV data (luminance Y data, colordifference U and V data).

The compression/expansion circuit 105 performs compression processingwith respect to the YUV data, with a compression method conforming tothe JPEG method, or performs expansion processing with respect to thecompressed image data stored in a memory card, with an expansion methodconforming to the JPEG method.

The DRAM 107 is a frame memory which temporarily stores the picked upimage data, the image data read from the memory card 106 and the like.The memory card 106 is provided detachably with respect to the digitalcamera body, and stores the compressed image data as an image file.

The liquid crystal monitor 207 is for displaying image data and thelike. The sub-LCD 208 is for displaying modes and operation contents setin the digital camera.

The zoom driver 110 a drives the zoom motor 109 a, in response to acontrol signal input from the controller 115, to thereby shift the zoomlens 202 a in the direction of optical axis. The focus driver 110 bdrives the focus motor 109 b, in response to a control signal input fromthe controller 115, to thereby shift the focus lens 2 b in the directionof optical axis. The diaphragm/shutter driver 110 c drives thediaphragm/shutter motor 119 c, in response to a control signal inputfrom the controller 115, to thereby set a diaphragm stop of thediaphragm in the mechanical mechanism 101 and open or close themechanical shutter in the mechanical mechanism 101.

The SG 111 drives the CCD 10 and the 2F/E 103, based on a control signalinput from the controller 115. The battery 112 comprises, for example, aNiCd battery, a nickel hydrogen battery or a lithium battery, andsupplies DC voltage to the DC/DC converter 113. The AC adapter 114converts the AC voltage to the DC voltage and supplies the DC voltage tothe DC/DC converter 113. The DC/DC converter 113 converts the DC voltagelevel input form the battery 112 and the AC adapter 114 to supply powerto each section of the digital cameral.

The communication driver 116 is connected to an external equipment (forexample, a personal computer) for performing data communication. Thenetwork communicator 117 is for performing data communication with thenetwork.

The electronic flash unit 203 is a unit which emits electronic flashlight, and emits light for preventing red-eye phenomenon or for mainlight emission, under control of the controller 115.

The operation section 108 comprises various keys and switches (a releaseswitch 211, a mode changing switch 212, an electronic flash switch 213,an image quality mode switch 214, a cursor key 215, a DATE switch 216,an ENTER key 217 and a SELECT key 218), as shown in FIG. 13, for a userto give various instructions to the digital camera, and detectsoperation of various keys and switches and outputs it to the controller115. The release switch 211 is a two-stage switch, such that a first SWis turned ON by half pushing (a first pushing stroke), and a second SWis turned ON by full pushing (a second pushing stroke). In the digitalcamera, when the first SW is turned ON, the AE operation and the AFoperation are executed, and when the second SW is turned ON, thephotographing operation is executed.

In FIG. 3, there is shown a user setup screen for recording conditionsdisplayed on the liquid crystal monitor 207, when the SETUP mode isselected by the mode changing switch 212 in the operation section 108.The user setup screen for recording conditions shown in this figure is ascreen for a user to set setting condition for each item ([AF/Manual] in“Focus”, [ON/OFF] in “Face detection (face detection operation mode)”,[Auto/manual] in “Photometric point”, [ON/OFF] in “Long time exposure”,and [ON/OFF] in “With date”). In the screen shown in this figure, adesired item is selected by the cursor key 215, a desired settingcondition is selected by the SELECT key 218 in the selected item, andthe selected setting condition is set by the ENTER key 217. In theexample shown in this figure, the setting is made such that “Focus” is[AF], “Face detection (face detection operation mode)” is [ON],“Photometric point” is [Auto], “Long time exposure” is [OFF], and “Withdate” is [OFF].

The controller 115 is a unit which controls the overall operation of thedigital camera, and comprises, the CPU 115 a which controls theoperation of each section in the digital camera, using the FLASH_RAM 115c as a work area, in accordance with a control program stored in theFLASH_ROM 115 b, based on the instruction from the operation section108, an SD_ROM 115 b which stores various control programs executed bythe CPU 115 a, and parameters and data necessary for the control, and anSD_RAM 115 c used as the work area of the CPU 115 a. The controlprogram, parameters and data stored in the FLASH_ROM 115 b can bedistributed through the network, and can be also stored by downloadingthese through the network. The program, parameters and data can bewritten in the FLASH_ROM 115 b from an external equipment connected viathe communication driver section 116.

The CPU 115 a controls the monitoring operation, the AF operation, theAE operation, the photographing operation, the electronic flashingoperation and the like. The outline of the basic operation of (1)monitoring operation, (2) AF operation and (3) still picturephotographing operation, to be executed under control of the CPU 115 a,will be explained below.

(1) Monitoring Operation

When the still picture mode or the motion picture mode is selected bythe mode changing switch 212 in the operation section 108, the CPU 115 adisplays a monitored image of a subject on the liquid crystal monitor207. Specifically, the image data of the subject input from the CCD 102is processed by the F/E (CDS, AGC, A/D) 103, signal-processed by the IPP104 and then written in the DRAM 107. The CPU 115 a displays themonitored image corresponding to the image data stored in the DRAM 107on the liquid crystal monitor 207. A user can determine thephotographing composition, watching the monitored image of the subjectdisplayed on this liquid crystal monitor 207.

(2) AF Operation

After the still picture mode or the motion picture mode has beenselected by the mode changing switch 212 in the operation section 108,when the release switch 211 is half-pushed to turn on the SW 1, the CPU115 a executes the AF operation. Specifically, in the AF operation, whenthe face detection mode is set, the face detection processing is firstexecuted to thereby detect a human face. More specifically, the imagedata input from the CCD 102 is processed in the F/E (CDS, AGC, A/D) 103,signal-processed by the IPP 104 and then written in the DRAM 107. TheCPU 115 a detects a human face from image data stored in the DRAM 107,by using the known face detection technique (Gabor Wavelettransform+graph matching). The CPU 115 a executes the automatic focusingprocessing, using a known automatic focusing method such as amountaineering servo method, designating the detected human face as theranging area (AF area), to shift the focus lens 202 b to a focusingposition, to thereby focus on the human face. In such automatic focusingprocessing, the focus lens 202 b is moved, to sample an AF evaluationvalue indicating a contrast of the subject corresponding to the imagedata in the ranging area (AF area), of the image data input from the CCD102, and designates the peak position of the AF evaluation value as thefocusing position.

The CPU 115 a executes the control program to thereby perform facedetection by the software, but dedicated hardware for face detection maybe provided.

(3) Still Picture Photographing Operation

When the still picture mode is selected by the mode changing switch 212in the operation section 108, and the release switch in the operationsection 108 is fully pushed to turn on the SW 2, the CPU 115 a executesthe still picture photographing operation. The imaged data taken in fromthe CCD 102 is signal-processed by the IPP 104, and subjected to thecompression processing by the compression/expansion circuit 105, andthen written in the DRAM 107. The CPU 115 a then writes the compressedimage data written in the DRAM 107 into the memory card 106 as a stillpicture file.

First Example

FIG. 4 is a flowchart which explains a first example of the AF operationof the digital camera. FIG. 5 and FIG. 6 are diagrams which show displayexamples on the liquid crystal monitor 207. FIG. 5 shows a displayexample when the human face of the subject is one, and FIG. 6 shows adisplay example when the human face of the subject is plural (two). TheAF operation of the digital camera will be explained in accordance withthe flowchart in FIG. 4, with reference to the display examples on theliquid crystal monitor 207 shown in FIG. 5 and FIG. 6. The CPU 115 aexecutes the AF processing, when the still picture mode or the motionpicture mode is selected by the mode changing switch 212 in theoperation section 108, and then the release switch 213 is half-pushed toturn on the SW 1.

In FIG. 4, the CPU 115 a first judges whether the face detectionoperation mode is set, by which human face detection is to be executed(step S201). The face detection operation mode is set on the user setupscreen for recording conditions (see FIG. 3). As a result of thisjudgment, when it is judged that the face detection operation mode hasbeen set, the CPU 115 a executes the face detection processing to detecta face (step S202).

Methods (1) to (3) shown below are known as the method of detecting aface in the subject image, and in a third embodiment, either one ofthese methods is used,

(1) A method of forming a mosaic image of a color image, and extractinga face area by paying attention to the flesh-colored area, as shown in“Proposal of modified HSV color system effective in face areaextraction”, Television Society Magazine Vol. 49, No. 6, pp. 787-797(1995),(2) A method of using geometrical shape characteristic relating to eachportion which constitutes a head of front human object image, such ashair, eyes and the mouth, to extract a head area of the front humanobject image, as shown in “Method of extracting face area from stillgrayscale scene picture”, Electronic Information Communication SocietyMagazine, Vol. 74-D-II, No. 11, pp. 1625-1627 (1991), and(3) A method of extracting a front human object image by using a profileedge of the human object image, which appears due to a delicate movementof the human object between the frames, in a case of a motion picture,as shown in “Face area detection for videophone and effect thereof”,Image Laboratory 1991-11 (1991).

When the human face is detected, the CPU 115 a detects the eyes, thenose, the mouth and the ears. Detection of the eyes, the nose, the mouthand the ears in the face can be performed, using a known method. Forexample, detection of eyes can be performed, using techniques disclosedin Japanese Patent Application Laid-Open No. H3-17696, Japanese PatentApplication Laid-Open No. H4-255015, Japanese Patent ApplicationLaid-Open No. H5-300601, Japanese Patent Application Laid-Open No.H9-21611 and Japanese Patent Application Laid-Open No. H9-251342.

The CPU 115 a then judges whether the face has been detected (stepS203). As a result of this judgment, when the face has been detected,the CPU 115 a displays a rectangular frame on the face portion of thehuman object (displays face detection execution result OK), in the imagedata displayed on the liquid crystal monitor 207, to thereby notify theuser of the detection of the face (step S204). FIG. 5A shows a displayexample (when the human face is one) of the image data (monitored image)displayed on the liquid crystal monitor 207. FIG. 5B shows a displayexample, when a rectangular frame A is displayed on the human faceportion in the image data in FIG. 5A. FIG. 6A shows a display example ofthe image data (monitored image) displayed on the liquid crystal monitor207, when there is a plurality of (two) human faces. FIG. 6B shows adisplay example, when rectangular frames A1 and A2 are displayed on thehuman face portions in the image data in FIG. 6A.

The CPU 115 a judges whether there is a plurality of faces (step S205).As a result of this judgment, when a plurality of faces are detected,the CPU 115 a judges whether the ranging area selection mode has beenset, by which a user selects the ranging area (step S206). The rangingarea selection mode is set on the user setup screen for recordingconditions (see FIG. 3). As a result of this judgment, when it is judgedthat the ranging area selection mode has not been set, the CPU 115 asets a face close to the center as the ranging area (step S207), andthen executes the automatic focusing processing (step S208).

On the other hand, at step S206, when it is judged that the ranging areaselection mode has been set, the CPU 115 a displays characters or thelike for the user to select the ranging area on the liquid crystalmonitor 207 (step S211). FIG. 6C shows a display example in whichcharacters or the like for the user to select the ranging area (guidancedisplay for selecting the ranging area) on the screen in FIG. 6B.

Subsequently, by the user operation of the operation section 108, adesired position is selected as the ranging area, among face-recognizedpositions displayed on the liquid crystal monitor 207 (step S212). InFIG. 6C, the user selects either one of the rectangular frames A1 and A2by the operation of the cursor key 215, and the selected rectangularframe is determined as the ranging area by the ENTER key 217. FIG. 6Dshows an example in which the rectangular frame A2 is selected as theranging area in FIG. 6C.

After having set the inside of the selected rectangular frame as theranging area (step S213), the CPU 115 a executes the automatic focusingprocessing (step S208).

On the other hand, at step S205, if a plurality of faces are notdetected, that is, only one face is detected, the CPU 115 a judgeswhether eyes, nose, mouth and ears in the face are detected in the face(step S214). As a result of this judgment, when the eyes, nose, mouthand ears in the face cannot be detected, the CPU 115 a sets the centralposition of the face as the ranging area (step S217), to perform theautomatic focusing processing (step S208).

On the other hand, at step S214, when the eyes, nose, mouth and ears inthe face cannot be detected, the CPU 115 a judges whether the rangingarea selection mode has been set, by which the user selects the rangingarea (step S215). As a result of this judgment, when the CPU 115 ajudges that the ranging area selection mode has not been set, the CPU115 a sets the position of eyes as the ranging area (step S218), andexecutes the automatic focusing processing (step S208).

At step S215, when it is judged that the ranging area selection mode hasbeen set, the CPU 115 a displays a rectangular frame on the eyes, thenose, the mouth and the ears, respectively, on the liquid crystalmonitor 207 (step S16). FIG. 5C is a diagram which shows a displayexample, when rectangular frames a1 to a4 are displayed respectively onthe eyes, the nose and the mouth, in the image data of the subject inFIG. 5A.

From the positions where the eyes, the nose, the mouth and the ears arerecognized, which are displayed on the liquid crystal monitor 207, adesired position is selected as the ranging area by the user operationof the operation section 108 (step S212). In FIG. 5C, the user selectsany one of the rectangular frames a1 to a4 by operating the cursor key215, and determines a selected rectangular frame as the ranging area bythe ENTER key 217. FIG. 5D shows an example in which a rectangular framea3 has been selected as the ranging area in FIG. 5C.

After having set the face portion in the rectangular frame determined bythe user (step S213) as the ranging area, the CPU 115 a executes theautomatic focusing processing (step S8).

On the other hand, at step S201, when it is judged that the facedetection operation mode has not been set, or at step S203, when a facehas not been detected, the CPU 115 a sets the normal ranging areaposition as the ranging area (step S210), and then executes theautomatic focusing processing (step S208). When the release switch 211is fully pushed, photographing is carried out.

As described above, according to the first example, the CPU 115 adetects a human face in the image data input by the CCD 102, and carriesout the automatic focusing control, designating at least a part of thedetected human face as the ranging area. Thereby, the CPU 115 a executesthe automatic focusing operation, designating the human face in thescreen as the ranging area. Therefore, the human face can be broughtinto focus, regardless of the position of the human object in thescreen. As a result, the human object can be photographed, withoutchanging the composition between at the time of the automatic focusingoperation and at the time of photographing.

According to the first example, when having detected a human face, theCPU 115 a displays a rectangular frame (see FIG. 5) on the face in theimage data displayed on the liquid crystal monitor 207. Therefore, theuser is notified of the detection of the face, so that the user canrecognize that the face has been detected.

According to the first example, when a plurality of faces are detected,the CPU 115 a carries out automatic focusing control, designating a faceclose to the central portion as the ranging area. Thereby, the mainsubject can be brought into focus at a high probability. In an aggregatephotograph, it is possible to increase the possibility that faces at thefront, back, right, and left positions of the face in the center arealso brought into focus at a high probability.

According to the first example, when a plurality of faces are detected,the user selects the ranging area from the faces (see FIG. 6), and theCPU 115 a performs automatic focusing control based on the ranging areaselected by the user. As a result, the user can select which humanobject is brought into focus.

According to the first example, the user can set permission/inhibitionof the face detection operation (see FIG. 3). Therefore, the user canomit unnecessary face detection operation by setting permission orinhibition of the face detection operation, thereby enabling more promptphotographing.

According to the first example, when eyes of a human face are detected,and when the ranging area selection mode is not set, the CPU 115 acarries out the automatic focusing control, designating the eyes as theranging area. As a result, photographing can be performed by focusing onthe eyes.

According to the first example, when any of the eyes, the mouth, thenose, and the ears of a human face is detected, and when the rangingarea selection mode is set, the user selects the ranging area from thedetected eyes, nose, mouth and ears, and the CPU 115 a performsautomatic focusing control based on the ranging area selected by theuser. As a result, the user can focus the lens on a portion in the faceon which the user wants to focus, and hence user's photographingintention can be reflected.

Second Example

A second example of the AF operation will be explained, with referenceto FIG. 7 to FIG. 9. In the second example of the AF operation, the sizeof the ranging area is changed depending on the size of the detectedhuman face.

FIG. 7 shows a user setup screen for recording conditions displayed onthe liquid crystal monitor 207, when a SETUP mode is selected by themode changing switch 12 in the operation section 108 in the secondexample. The user setup screen for recording conditions shown in thisfigure is a screen for a user to set setting condition for each item([AF/Manual] in “Focus”, [ON/OFF] in “Face detection (face detectionoperation mode)”, [ON/OFF] in “Ranging area automatic setting (rangingarea automatic setting mode)”, [Auto/manual] in “Photometric point”,[ON/OFF] in “Long time exposure”, and [ON/OFF] in “With date”). In thescreen shown in this figure, a desired item is selected by the cursorkey 215, a desired setting condition is selected by the SELECT key 218in the selected item, and the selected setting condition is set by theENTER key 217. In the example shown in this figure, the setting is madesuch that “Focus” is [AF], “Face detection (face detection operationmode)” is [ON], “Ranging area automatic setting (ranging area automaticsetting mode)” is [ON], “Photometric point” is [Auto], “Long timeexposure” is [OFF], and “With date” is [OFF].

FIG. 8 is a flowchart which explains the second example of the AFoperation. FIG. 9 is a diagram which shows a display example on theliquid crystal monitor 207. The second example of the AF operation willbe explained, with reference to the display example on the liquidcrystal monitor 207 shown in FIG. 9, in accordance with the flowchartshown in FIG. 8. After the still picture mode or the motion picture modehas been selected by the mode changing switch 212 in the operationsection 108, the CPU 115 a executes the AF processing when the releaseswitch 213 is half-pushed to turn on the SW 1.

In FIG. 8, the CPU 115 a first judges whether the face detectionoperation mode in which face detection of a human object is executed,has been set (step S231). The face detection operation mode is set onthe user setup screen for recording conditions (see FIG. 7). As a resultof this judgment, when it is judged to be the face detection operationmode, the CPU 115 a executes the similar face detection processing tothat of the first embodiment (step S232).

The CPU 115 a then judges whether the face has been detected (stepS233). As a result of this judgment, when the face has been detected,the CPU 115 a displays a rectangular frame on the face portion of thehuman object (displays face detection execution result OK), in the imagedata displayed on the liquid crystal monitor 207, to thereby notify theuser of the detection of the face (step S234).

The CPU 115 a judges whether the ranging area automatic setting mode hasbeen set, in which the size of the ranging area is automatically set(step S235). The ranging area automatic setting mode is set on the usersetup screen for the recording conditions (see FIG. 7). As a result ofthis judgment, when it is judged that the ranging area automatic settingmode has been set, the CPU 115 a compares the size of the detected faceand a predetermined value 1 (step S136), and when the face size is notlarger than the predetermined value 1, the CPU 115 a sets size 1 of theranging area (step S241). On the other hand, if the face size is largerthan the predetermined value 1, the CPU 115 a compares the face sizewith a predetermined value 2 (however, predetermined value2>predetermined value 1) (step S237), and when the face size is largerthan the predetermined value 2, the CPU 115 a sets size 3 of the rangingarea (step S238). When the face size is not larger than thepredetermined value 2, the CPU 115 a sets size 2 of the ranging area(step S242).

On the other hand, at step S235, if the ranging area automatic settingmode has not been set, the user sets the size 1, 2 or 3 of the rangingarea (step S243). FIG. 5A shows a display example of the image data(monitored image) displayed on the liquid crystal monitor 207. In FIG.9, there is displayed a screen for a user to select the size of theranging area, on the screen shown in FIG. 5A. In FIG. 9, there aredisplayed three sizes (size 1, size 2 and size 3) of ranging areashaving different sizes, and the user operates the cursor key 215 toselect one of size 1, size 2 and size 3, and determines the selectedsize as the size of the ranging area, by the ENTER key 217. In theexample shown in FIG. 9, the size 2 of the ranging area has beenselected.

After having set the ranging area of the size, automatically set orselected by the user, on the portion of the detected human face, the CPU115 a executes the automatic focusing processing (step S239).

On the other hand, when it is judged that the face detection operationmode has not been set at step S231, or when the face has not beendetected at step S233, the CPU 115 a sets the normal ranging areaposition as the ranging area (step S240), and then executes theautomatic focusing processing (step S239).

As explained above, according to the second example, when the rangingarea automatic judgment mode is set, the CPU 115 a automatically setsthe size of the ranging area based on the size of the detected humanface, to perform automatic focusing control. As a result, the focusingaccuracy can be improved.

Further, according to the second example, when the ranging areaautomatic judgment mode is not set, the user selects the size of theranging area (see FIG. 9), the CPU 115 a sets the ranging area of a sizeselected by the user, to perform automatic focusing control. As aresult, the focusing accuracy can be improved, when a specific portionin the face is brought into focus.

The present invention is not limited to the first example and the secondexample, and various modification is possible within the range that doesnot change the essential point of the invention, and for example,modifications described below are possible.

First Modification Example

A human object photographing mode for taking a picture of a human object(first photographing mode) and a landscape photographing mode for takinga picture of landscape (second photographing mode) are provided in thedigital camera of the present invention, such that the mode can beselected by, for example, the mode changing switch 212. When the humanobject photographing mode is selected, the CPU 115 a performs automaticfocusing control accompanied with the face detection processing(processing after “YES” at step S201 in FIG. 4). When the landscapephotographing mode is selected, the CPU 115 a does not perform the facedetection processing, and may perform the automatic focusing control(processing after “NO” at step S201 in FIG. 4), based on the normalranging area. This is because, in the human object photographing mode inwhich it is necessary to focus the lens on the face, the face detectionprocessing is necessary, but in the landscape photographing mode inwhich it is not necessary to focus the lens on the face, the facedetection processing is not necessary.

Second Modification Example

Every time the CPU 115 a performs the automatic focusing control,designating the face detected by the face detection processing as theranging area, the CPU 115 a stores the ranging result (focusingposition) in the FLASH_ROM 115 b, and the next focusing position may bepredicted from the past ranging results stored in the FLASH_ROM 115 b.Thereby, the next focusing position can be predicted from the pastfocusing positions to thereby focus the lens on the face quickly,thereby enabling prompt photographing.

Second Embodiment

A digital camera according to a second embodiment will be explained,with reference to FIG. 2 and FIG. 10 to FIG. 19. In the secondembodiment, a digital camera that can properly expose a human object,regardless of the position and range of the human object in the screenwill be explained. The visual configuration and the block configurationof the digital camera according to the second embodiment are the same asthose in the first embodiment (FIG. 1 and FIG. 2), and hence explanationof the common parts is omitted, and only the different part will beexplained.

FIG. 10 and FIG. 11 show the user setup screen for recording conditionsdisplayed on the liquid crystal monitor 207, when the SETUP mode isselected by the mode changing switch 212 in the operation section 108 inFIG. 2. The user setup screen for recording conditions shown in thisfigure is a screen for a user to set setting condition for each item([AF/Manual] in “Focus”, [ON/OFF] in “Face detection (face detectionoperation mode)”, [Auto/manual (face (first photometricmethod)/face+background (second photometric method)] in “Photometricmethod”, [ON/OFF] in “Long time exposure”, and [ON/OFF] in “With date”).In the screen shown in this figure, a desired item is selected by thecursor key 215, a desired setting condition is selected by the SELECTkey 218 in the selected item, and the selected setting condition is setby the ENTER key 217.

As described above, when the user selects [Auto] in the “photometricmethod”, the CPU 115 a selects either the first photometric method(face) or the second photometric method (face+background). On the otherhand, when the user selects [Manual] in the “photometric method”, theuser then selects either [face (the first photometric method)] or[face+background (the second photometric method)]. In the example shownin FIG. 10 and FIG. 11, the setting is made such that “Focus” is [AF],“Face detection (face detection processing)” is [ON], “Photometricmethod” is [Auto], “Long time exposure” is [OFF], and “With date” is[OFF].

The CPU 115 a in FIG. 2 controls the monitoring operation, the AFoperation, the AE operation, the photographing operation, the electronicflashing operation and the like. The outline of the AE operation whichis executed under control of the CPU 115 a will be explained below. Themonitoring operation and the photographing operation are the same as inthe third embodiment.

[AE Operation]

After the still picture mode or the motion picture mode has beenselected by the mode changing switch 12 in the operation section 108,when the release switch 11 is half-pushed to turn on the SW 1, the CPU115 a executes the AE processing. Specifically, in the AE operation,when the face detection operation mode has been set (see FIG. 10 andFIG. 11), the CPU 115 a first executes the face detection processing todetect a human face. Specifically, the image data input from the CCD 102is processed by the F/E (CDS, AGC, A/D) 103 and input in the IPP 104.This image data is signal-processed by the IPP 104 and then written inthe DRAM 107. The CPU 115 a detects a human face from image data storedin the DRAM 107, by using the known face detection technique (GaborWavelet transform+graph matching). The CPU 115 a calculates an AEevaluation value (photometric result), designating the detected humanface as the photometric area (AE area), and calculates the exposurebased on this AE evaluation value. Then the CPU 115 a sets the exposureconditions (electronic shutter speed of the CCD 3, diaphragm stop of thediaphragm of the mechanical mechanism 101, gain of the AGC circuit inthe F/E 103, and the like) corresponding to the exposure, to therebyperform exposure control.

The calculation method of the AE evaluation value will be specificallyexplained. FIG. 12 shows a division example when the screen of the CCD102 (image frame) is divided into a plurality of areas Y1 to Y35. FIG.13 is a diagram which shows one example of the image data of the subjectin FIG. 12.

The IPP 104 calculates luminance data Y1 to Y35 for each area Y1 to Y35,whose optical intensity is to be measured, based on the image data (eachpixel data (R, G, B)) input from the CCD 102. The calculation equationof the luminance data is shown below. In the calculation equation, Rn,Gn and Bn indicate a mean value of each pixel data (R, G, B) in eacharea, respectively.Area 1 Y1=0.299R1+0.587G1+0.114B1Area 2 Y2=0.299R2+0.587G2+0.114B2Area n Yn=0.299Rn+0.587Gn+0.114Bn

When the face detection operation mode has been set, and when thephotometric processing is to be performed using only the face (firstphotometric method), the luminance data of the area including the faceis respectively calculated, and a mean value of the luminance data ofthe calculated area is designated as luminance data Yy (AE evaluationvalue). In the example shown in FIG. 13, a mean value of the luminancedata of areas Y14, Y20, Y21, Y26 and Y27 is designated as luminance dataYy (AE evaluation value).

When the face detection operation mode has been set, and when thephotometric processing is to be performed using the face and the wholescreen, the luminance data of the area including the face isrespectively calculated, and a mean value of the luminance data of thecalculated area is designated as luminance data Yface. The luminancedata of areas Y1 to Y25 on the whole screen is respectively calculated,and a mean value of the luminance data of the calculated whole area isdesignated as luminance data Yall. The luminance data Yy (AE evaluationvalue)=Yface×n1+luminance data Yall×n2 is then calculated, designatingweighting to the face portion as n1 and weighting to the whole screen asn2 (provided that, n1>n2, n1+n2=1).

At the time of normal photometric processing, any one of the followingmethods is used to calculate the luminance data Yy (AE evaluationvalue), (1) center-weighted photometric method (a method of determiningluminance data by placing emphasis on the brightness in the center andadding the ambient brightness), (2) partial photometric method (a methodof determining luminance data only by a mean value of luminance dataonly within an area in the screen), (3) spot photometric method (havingthe same idea as the partial photometric method, but the photometricarea is as small as about 1 to 2%), and (4) divided photometric method(a method of dividing a screen into a plurality of areas, to obtain amean value of luminance for each area, and determining luminance datafrom the distribution pattern of the luminance).

When the value of target luminance data Yx stored in the FLASH_ROM 115 bin advance agrees with the value of luminance data Yy of the subject,being a result of measuring optical intensity of the subject, the CPU115 a judges it to be a proper exposure (brightness), calculates theexposure so that the luminance data Yy of the subject becomes the targetluminance data Yx, and sets the exposure conditions (shutter speed ofthe CCD 102, diaphragm stop (opening degree) of the diaphragm of themechanical mechanism 101, sensitivity of the CCD 102 (gain of anamplifier circuit in the F/E 103)) based on the calculated exposure.

Specifically, the CPU 115 a carries out any one (or may be two or more)of “slowing down the shutter speed of the CCD 102”, “increasing the sizeof the diaphragm”, and “increasing the sensitivity of the CCD 102”, inorder to increase the value of the luminance data Yy, and carries outthe opposite processing in order to decrease the value of the luminancedata Yy.

The CPU 115 a executes the control program to carry out face detection,but hardware dedicated for face detection may be provided.

First Example

FIG. 14 is a flowchart which explains a first example of the AEoperation. FIG. 15 is a diagram which shows a display example on theliquid crystal monitor 207. The first example of the AE operation willbe explained in accordance with the flowchart shown in FIG. 14, withreference to the display example of the liquid crystal monitor 207 inFIG. 15. After the still picture mode or the motion picture mode hasbeen selected by the mode changing switch 212 in the operation section108, when the release switch 211 is half-pushed to turn on the SW 1, theCPU 115 a in FIG. 2 executes the AE processing.

In FIG. 14, CPU 115 a in FIG. 2 first judges if the face detectionoperation mode for executing face detection of a human object has beenset (step S301). The face detection operation mode is set on the usersetup screen for recording conditions (see FIG. 10 and FIG. 11). As aresult of this judgment, when it is judged to be the face detectionoperation mode, the CPU 115 a executes the face detection processing(step S302). The method of detecting the human object image from thesubject image is the same as that in the first embodiment, and hence thedetailed explanation thereof is omitted.

The CPU 115 a then judges whether the face has been detected (stepS303). As a result of this judgment, when the face has been detected,the CPU 115 a displays a rectangular frame on the face portion of thehuman object (displays face detection execution result OK), in the imagedata displayed on the liquid crystal monitor 207, to thereby notify theuser of the detection of the face (step S304). FIG. 15A shows a displayexample of the image data (monitored image) displayed on the liquidcrystal monitor 207. FIG. 15B shows a display example when therectangular frame is displayed on the face portion of the human objectin the image data shown in FIG. 15A.

Subsequently, the CPU 115 a judges if the photometric method has beenset (step S305). The photometric method is set on the user setup screenfor recording conditions (see FIG. 10 and FIG. 11). As a result of thisjudgment, when the photometric method has been set, control proceeds tostep S307.

When the photometric method has not been set at step S305, the CPU 115 aexecutes the photometric automatic judgment processing (step S306), andcontrol proceeds to step S307. In this photometric automatic judgmentprocessing, selection is carried out, based on the ratio of the faceoccupying in the screen or the position of the face or both, either of a“first photometric method in which only the face portion is opticallymeasured, to calculate the luminance data Yy (AE evaluation value), tocalculate the exposure”, or a “second photometric method in which, basedon the photometric result of the face and the photometric result of thewhole screen, the luminance data Yy (AE evaluation value) is calculated,by placing emphasis on the photometric result of the face (by givingmore weight to the photometric result of the face), to thereby calculatethe exposure”. Specifically, when the ratio of the face occupying in thescreen is large or the face is in the central position of the screen orboth, the first photometric method is selected, and in other cases, thesecond photometric method is selected.

When the selected photometric method is the first photometric method,the CPU 115 a carries out the photometric processing, designating theface portion as the photometric area (AE area) (step S308). The CPU 115a calculates the exposure based on the photometric result in thephotometric area (luminance data Yy (AE evaluation value)) (step S309),and executes the exposure setup processing, to thereby set the exposureconditions based on the calculated exposure (step S310).

At step S307, when the selected photometric method is the secondphotometric method, the CPU 115 a executes the photometric processingfor the whole screen, to optically measure the optical intensity on thewhole screen (step S311). The CPU 115 a carries out the photometricprocessing, designating the face portion as the photometric area (AEarea) (step S312). Based on the photometric result of the face and thephotometric result of the whole screen, the CPU 115 a calculates theluminance data Yy (AE evaluation value), by placing emphasis on thephotometric result of the face (by giving more weight to the photometricresult of the face), corresponding to the ratio of the face occupying inthe screen or the position of the face or both, to thereby calculate theexposure (step S313) based on the calculated luminance data Yy (AEevaluation value). The CPU 115 a then executes the exposure setupprocessing, to thereby set the exposure conditions based on thecalculated exposure (step S310).

When it is judged that the face detection operation mode has not beenset at step S301, or when the face has not been detected at step S303,the CPU 115 a executes the normal photometric processing (step S314),calculates the exposure based on the photometric result (step S315), andcarries out the exposure setup processing to thereby set the exposureconditions based on the calculated exposure (step S310).

As explained above, according to the first example, the CPU 115 adetects a human face in the subject, and carries out exposure controlbased on the photometric result for the detected human face. As aresult, regardless of the range and position of the human object, thehuman object can be properly exposed.

According to the first example, the CPU 115 a selects either of thefirst photometric method in which the exposure is calculated based onthe photometric result of the human face, and the second photometricmethod in which weighting to the photometric result of the human face isincreased compared with the photometric result of the whole screen,based on the photometric result of the human face and the photometricresult of the whole screen, to thereby calculate the exposure,corresponding to the ratio of the face occupying in the screen or theposition of the face or both. As a result, when the face occupying inthe screen is large, or when the face is in the center, the firstphotometric method in which the exposure is calculated based on thephotometric result of the human face is adopted, thereby priority can begiven to the proper exposure of the human object.

According to the first example, since a user can select the firstphotometric method and the second photometric (see FIG. 10 and FIG. 11),the user can select either the photometric result of the whole screen orthe photometric result of the face, to which much weight is given,thereby the user's photographing intention can be reflected.

According to the first example, when the second photometric method is tobe executed, the CPU 115 a sets weighting to the photometric result ofthe face with respect to the photometric result of the whole screen,according to the ratio of the face occupying in the screen or theposition of the face or both. Therefore, if the ratio of the faceoccupying in the screen is large, weighting to the photometric result ofthe face portion is increased, and if the ratio of the face occupying inthe screen is small, weighting to the photometric result of the faceportion is decreased, thereby enabling exposure well balanced betweenthe face and the background.

According to the first example, since the user can setpermission/inhibition of the face detection (face detection operationmode) (see FIG. 10 and FIG. 11), the user can select whether a humanobject is to be properly exposed.

According to the first example, since a rectangular frame is displayedon the detected face on the liquid crystal monitor 207 to display forthe user that the CPU 115 a has succeeded in the face detection, theuser can confirm whether the face detection is a success or not.

According to the first example, on the user setup screen for recordingconditions (see FIG. 10 and FIG. 11) displayed on the liquid crystalmonitor 207, either the first photometric method or the secondphotometric method is selected. However, for example, on the screenwhere the monitored image is displayed on the liquid crystal monitor207, either the first photometric method or the second photometricmethod may be selected. FIG. 17 shows a display example of the screenfor selecting the first photometric method or the second photometricmethod. In this figure, E1 indicates the first selection method and E2indicates the second selection method, and the user selects one ofthose.

Second Example

In a second example of the AE operation, in the second photometricmethod (a method of calculating the exposure based on the photometricresult of the human face and the photometric result of the whole screen,by giving more weight to the photometric result of the human face ascompared with the photometric result of the whole screen), the user canset the weighting ratio between the face and the background.

FIG. 18 is a flowchart which explains the second example of the AEoperation. FIG. 19 is a diagram which shows a display example on theliquid crystal monitor 207. The second example of the AE operation willbe explained in accordance with the flowchart shown in FIG. 18, withreference to the display example of the liquid crystal monitor 207 inFIG. 19. After the still picture mode or the motion picture mode hasbeen selected by the mode changing switch 212 in the operation section108, when the release switch 211 is half-pushed to turn on the SW 1, theCPU 115 a executes the AE processing.

In FIG. 18, CPU 115 a in FIG. 2 first judges if the face detectionoperation mode for executing face detection of a human object has beenset (step S321). The face detection operation mode is set on the usersetup screen for recording conditions described above (see FIG. 10 andFIG. 11). As a result of this judgment, when it is judged that the facedetection operation mode has been set, the CPU 115 a executes the facedetection processing as in the first embodiment (step S322).

The CPU 115 a then judges whether the face has been detected (stepS323). As a result of this judgment, when the face has been detected,the CPU 115 a displays a rectangular frame on the face portion of thehuman object (displays face detection execution result OK), in the imagedata displayed on the liquid crystal monitor 207, to thereby notify theuser of the detection of the face (step S24). FIG. 15A shows a displayexample of the image data (monitored image) displayed on the liquidcrystal monitor 207. FIG. 15B shows a display example when therectangular frame is displayed on the face portion of the human objectin the image data shown in FIG. 15A.

Subsequently, the CPU 115 a executes weighting user setup processing forthe face portion (step S325). Specifically, in the weighting user setupprocessing of the face portion, the CPU 115 a displays a screen forsetting a weighting ratio between the face and the whole screen(background). FIG. 19 shows a display example of a screen for settingthe weighting ratio between the face and the whole screen (background).The user moves the position of an arrow displayed on the screen to adesired position by the cursor key 215, and presses the ENTER key 217,thereby the weighting ratio between the face and the whole screen(background) is set.

Thereafter, the CPU 115 a executes the photometric processing for thewhole screen, to thereby measure the optical intensity on the wholescreen (step S326). The CPU 115 a carries out the photometricprocessing, designating the face portion as the photometric area (AEarea) (step S327). Based on the photometric result of the face portionand the photometric result of the whole screen, the CPU 115 a calculatesthe luminance data Yy (AE evaluation value), by putting weight set bythe user, to thereby calculate the exposure (step S328) based on thecalculated luminance data Yy (AE evaluation value). The CPU 115 a thenexecutes the exposure setup processing, to thereby set the exposureconditions based on the calculated exposure (step S329).

When it is judged that the face detection operation mode has not beenset at step S321, or when the face has not been detected at step S323,the CPU 115 a executes the normal photometric processing (step S330),calculates the exposure based on the photometric result, to set theexposure conditions based on the calculated exposure (step S329).

As explained above, according to the second example, a user can setweighting to the photometric result of the human face with respect tothe photometric result of the whole screen. Therefore, when the exposureis adjusted based on the photometric result of the human face and thephotometric result of the whole screen, it is possible to reflect theuser's photographing intention.

The present invention is not limited to the first example and the secondexample, various modifications are possible within the range that doesnot change the essential point of the invention, and for example,modifications described below are possible.

First Modification Example

A human object photographing mode for taking a picture of a human object(first photographing mode) and a landscape photographing mode for takinga picture of landscape (second photographing mode) are provided in thedigital camera of the present invention, such that the mode can beselected by, for example, the mode changing switch 212. When the humanobject photographing mode is selected, the CPU 115 a performs exposurecontrol accompanied with the face detection processing (processing after“YES” at step S1 in FIG. 14). When the landscape photographing mode isselected, the CPU 115 a does not perform the face detection processing,and may perform the exposure control (processing after “NO” at step S1in FIG. 14) by the normal photometric method. This is because, in thehuman object photographing mode in which it is necessary to properlyexpose the face, the face detection processing is necessary, but in thelandscape photographing mode in which it is not necessary to properlyexpose the face, the face detection processing is not necessary.

Second Modification Example

In the first example and the second example, the face detectionexecution result is displayed on the liquid crystal monitor 207, but itmay be displayed on the sub-LCD 208. FIG. 16 shows a display example onthe sub-LCD 208, when the CPU 115 a has succeeded in the face detection.An LED may be provided for displaying the face detection executionresult, instead of the sub-LCD 208.

Third Embodiment

A digital camera according to a third embodiment will be explained, withreference to FIG. 2 and FIG. 20 to FIG. 26. In the third embodiment, adigital camera that can automatically judge if photographing of a humanobject is to be performed, and automatically performs electronicflashing suitable for photographing of a human object, without troublingthe user, will be explained. The visual configuration and the blockconfiguration of the digital camera according to the third embodimentare the same as those in the first embodiment (FIG. 1 and FIG. 2), andhence explanation of the common parts is omitted, and only the differentpart will be explained.

FIG. 20 shows the user setup screen for recording conditions displayedon the liquid crystal monitor 207, when the SETUP mode is selected bythe mode changing switch 212 in the operation section 108 in FIG. 2. Theuser setup screen for recording conditions shown in this figure is ascreen for a user to set setting condition for each item ([AF/Manual] in“Focus”, [ON/OFF] in “Face detection (face detection operation mode)”,[Auto/manual (weak user preset value, large, medium, small) in “Facedetection automatic weak emission (setting of weak preset value”,[ON/OFF] in “Red-eye preventing emission (red-eye emission mode)”,[ON/OFF] in “Face detection backlight correction (permission ofelectronic flashing at the time of judging backlight)”, [Auto/manual] in“Photometric point”, [ON/OFF] in “Long time exposure”, and [ON/OFF] in“With date”). In the screen shown in this figure, a desired item isselected by the cursor key 215, a desired setting condition is selectedby the SELECT key 218 in the selected item, and the selected settingcondition is set by the ENTER key 217.

As described below, when the user selects [Auto] in “Face detectionautomatic weak emission (setting of weak preset value”, the CPU 115 asets the weak preset value. On the other hand, when the user selects[Manual] in “Face detection automatic weak emission (setting of weakpreset value”, the user further sets either one of [Large, Medium,Small] in the weak preset value (weak preset value set by user).

In the example shown in this figure, the setting is made such that“Focus” is [AF], “Face detection (face detection operation mode)” is[ON], “Face detection automatic weak emission (setting of weak presetvalue” is [Auto], “Red-eye preventing emission (red-eye emission mode)”is [ON], “Face detection backlight correction (permission of electronicflashing at the time of judging backlight)” is [ON], “Photometric point”is [Auto], “Long time exposure” is [OFF], and “With date” is [OFF].

The CPU 115 a also controls the monitoring operation, the AF operation,the AE operation, the photographing operation, the electronic flashingoperation and the like. Further, the CPU 115 a comprises a still picturemode for recording still pictures and a motion picture mode forrecording motion pictures and speech, and controls execution of eachmode.

FIG. 21 is a block diagram which shows a detailed configuration of theelectronic flash unit 203 in FIG. 2. The electronic flash unit 203 hasan xenon tube, and comprises a light emitter 301 which emits electronicflash light, a main capacitor 302 which accumulates electric charge forlight emission of the xenon tube in the light emitter 301, a chargingcircuit (booster circuit) 303 for charging the main capacitor 302, alight emission starting (trigger) circuit 304 which starts lightemission of the xenon tube in the light emitter 301, a light emissionstopping circuit 305 which stops light emission of the xenon tube in thelight emitter 301, and a reflected light receiver 306 which receives thereflected light from a subject and outputs the light to the lightemission stopping circuit 305.

The operation of the electronic flash unit 203 will be explained below.The CPU 115 a outputs a charging start signal to the charging circuit303 at the time of charging. When the charging start signal is inputfrom the CPU 115 a, the charging circuit 303 raises the pressure of theoutput voltage input from the DC/DC converter 113, to thereby startcharging of the main capacitor 302. When charging is started, the CPU115 a regularly monitors the charging voltage of the main capacitor 302via the charging circuit 303. When the main capacitor 302 has beencharged up to an electronic flashing available voltage, which has beenpreset, the CPU 115 a outputs a charging stop signal to the chargingcircuit 303. The charging circuit 303 stops charging of the maincapacitor 302, when the charging stop signal is input from the CPU 115a.

When the CPU 115 a allows the xenon tube in the light emitter 301 toemit light, the CPU 115 a outputs a light emission signal to the lightemission starting circuit 304. When the light emission signal is inputfrom the CPU 115 a, the light emission starting circuit 304 starts lightemission from the xenon tube in the light emitter 301. The reflectedlight receiver 306 receives the reflected light from the subject, andoutputs the light to the light emission stopping circuit 305. The lightemission stopping circuit 305 integrates the reflected light input fromthe reflected light receiver 306. When the integral quantity of thereflected light becomes a predetermined value, the light emissionstopping circuit 305 stops light emission from the xenon tube in thelight emitter 301 (normal electronic flashing (main light emission)).When the integral quantity of the reflected light does not reach thepredetermined value, even if a certain period of time has passed, orwhen the xenon tube is made to emit light only for very short time, likered-eye preventing emission, the CPU 115 a outputs a light emission stopsignal to the light emission stopping circuit 305, and the lightemission stopping circuit 305 stops light emission from the xenon tubein response to this signal.

The outline of the electronic flashing operation which is executed undercontrol of the CPU 115 a will be explained below.

[Electronic Flashing Operation]

After the still picture mode or the motion picture mode has beenselected by the mode changing switch 212 in the operation section 108 inFIG. 2, and in the state with the electronic flash switch 213 turned ON,when the release switch 211 is fully pushed to turn on the SW2, the CPU115 a executes the electronic flashing operation. Specifically, in theelectronic flashing operation, when the face detection operation modehas been set (see FIG. 20), the face detection processing is executed todetect a human face. Specifically, the image data input from the CCD 102is processed by the F/E (CDS, AGC, A/D) 103, and input to the IPP 104.After signal processing has been carried out in the IPP 104, it iswritten in the DRAM 107. The CPU 115 a detects a human face from imagedata stored in the DRAM 107, by using the known face recognitiontechnique (Gabor Wavelet transform+graph matching). When the human faceis detected, it can be judged that photographing of a human object is tobe carried out. The CPU 115 a controls the electronic flash unit 203,based on the face detection result. In other words, in the digitalcamera in this embodiment, a human face is detected to automaticallyjudge that photographing of a human object is to be carried out, theelectronic flash unit 203 is automatically controlled without troublinga user, and the human object is photographed with proper brightness.Here, the CPU 115 a executes the control program to perform facedetection, but hardware dedicated for face detection may be provided.

FIG. 22 is a flowchart which explains the electronic flashing operationof the digital camera according to this embodiment. The electronicflashing operation of the digital camera shown in FIG. 2 will beexplained, with reference to the flowchart in FIG. 24. A case that theface detection operation mode has been set will be explained.

[Light Emission Request Initializing Processing]

In FIG. 22, the CPU 115 a in FIG. 2 clears the electronic flashingrequest (step S401), and then clears the red-eye emission request (stepS402). The CPU 115 a then executes the face detection processing (stepS403).

The face detection processing will be explained below. The method ofdetecting a human object image facing the front from a subject image isthe same as in the first embodiment, and hence the explanation thereofis omitted.

The CPU 115 a performs AE calculation processing for exposure, andperforms AE calculation processing from the image data taken in from theCCD 102 (step S404). The AE calculation processing will be explainedspecifically. FIG. 12 shows a division example when the screen of theCCD 102 (image frame) is divided into a plurality of areas Y1 to Y35.FIG. 13 is a diagram which shows one example of the image data of thesubject in FIG. 12.

The IPP 104 calculates luminance data Y1 to Y35 for each area Y1 to Y35,whose optical intensity is to be measured, based on the image data (eachpixel data (R, G, B)) input from the CCD 102. The calculation equationof the luminance data is shown below. In the calculation equation, Rn,Gn and Bn indicate a mean value of each pixel data (R, G, B) in eacharea, respectively.Area 1 Y1=0.299R1+0.587G1+0.114B1Area 2 Y2=0.299R2+0.587G2+0.114B2Area n Yn=0.299Rn+0.587Gn+0.114Bn

The IPP 104 calculates the luminance data Yy (photometric value), byusing any one of the following methods, (1) center-weighted photometricmethod (a method of determining luminance data by placing emphasis onthe brightness in the center and adding the ambient brightness), (2)partial photometric method (a method of determining luminance data onlyby a mean value of luminance data only within the area on the screen),(3) spot photometric method (having the same idea as the partialphotometric method, but the photometric area is as small as about 1 to2%), and (4) divided photometric method (a method of dividing a screeninto a plurality of areas, to obtain a mean value of luminance for eacharea, and determining luminance data from the distribution pattern ofthe luminance).

When the face detection operation mode has been set, the IPP 104respectively calculates the luminance data of the area including theface, and calculates the mean value of the luminance data of thecalculated area as luminance data YFace (brightness in the faceportion). In the example shown in FIG. 13, a mean value of the luminancedata of areas Y14, Y20, Y21, Y26 and Y27 is designated as luminance dataYface (brightness in the face portion).

When the face detection operation mode has been set, the IPP 104 alsorespectively calculates the luminance data of the other area excludingthe area including the face (areas around the face), and calculates themean value of the luminance data of the calculated other areas asluminance data YA (ambient brightness). In the example shown in FIG. 13,a mean value of the luminance data of areas Y1 to Y13, Y15 to Y19, Y22to Y25 and Y28 to Y35 is designated as luminance data YA (ambientbrightness).

[Electronic Flash Mode Confirmation Processing]

The CPU 115 a judges whether the electronic flash inhibiting mode hasbeen set (step S405). Such an electronic flash inhibiting mode is setwhen the electronic flash switch is turned OFF. As a result of thisjudgment, when the electronic flash inhibiting mode has been set, theflow is terminated, and on the other hand, when the electronic flashinhibiting mode has not been set, control proceeds to step 406.

At step S406, the CPU 115 a judges whether the forced light emissionmode has been set. Such a forced light emission mode is set on the usersetup screen for recording conditions described above (see FIG. 20). Asa result of this judgment, when the forced light emission mode has beenset, control proceeds to step S408, and on the other hand, when theforced light emission mode has not been set, control proceeds to stepS407.

At step S407, the CPU 115 a refers to the photometric result of the AEcalculation at step S404 to judge whether the photometric value is lessthan a predetermined threshold (predetermined brightness). As a resultof this judgment, if the photometric value is not less than thepredetermined threshold (predetermined brightness), control proceeds tostep S409, and on the other hand, if the photometric value is less thanthe predetermined threshold (predetermined brightness), the CPU 115 asets the electronic flashing request (step S408).

[Backlight Judgment Processing]

The CPU 115 a judges whether the electronic flashing is permitted at thetime of backlight judgment (step S409). Permission/inhibition of theelectronic flashing at the time of backlight judgment is set on the usersetup screen for recording conditions described above (see FIG. 20). Asa result of this judgment, if electronic flashing is not permitted atthe time of backlight judgment, control proceeds to step S413. On theother hand, if electronic flashing is permitted at the time of backlightjudgment, the CPU 115 a then judges whether a face is detected in thescreen in the above face detection processing (step S410).

As a result of this judgment, when the face has not been detected,control proceeds to step S413. On the other hand, at step S410, when theface has been detected, the CPU 115 a refers to the photometric resultof the AE calculation at step S404 to judge whether the face portion isdarker than the ambient portion by a predetermined value or more (stepS411). As a result of this judgment, if the face portion is not darkerthan the ambient portion by a predetermined value or more, controlproceeds to step S413. On the other hand, if the face portion is darkerthan the ambient portion by a predetermined value or more, theelectronic flashing request is set (step S412) and control proceeds tostep S413.

Subsequently, the CPU 115 a judges whether the electronic flashingrequest has been set in the processing up to now (step S413). As aresult of this judgment, if the electronic flashing request has not beenset, the flow is terminated, and on the other hand, if the electronicflashing request has been set, control proceeds to step S414.

[Red-Eye Emission Processing]

At step S414, the CPU 115 a judges whether the red-eye emission mode hasbeen set. This red-eye emission mode is set on the user setup screen forrecording conditions described above (see FIG. 20). As a result of thisjudgment, if the red-eye emission mode has been set, the CPU 115 a setsthe red-eye emission request (step S417), and control proceeds to stepS418. On the other hand, if the red-eye emission mode has not been set,the CPU 115 a judges whether a face has been detected in the screen(step S415). As a result of this judgment, if a face has not beendetected in the screen, control proceeds to step S418. On the otherhand, when a face has been detected in the screen, the CPU 115 a judgeswhether permission of automatic red-eye emission has been set (stepS416). This permission/inhibition of the automatic red-eye emission isset on the user setup screen for recording conditions described above(see FIG. 20). As a result of this judgment, if permission of automaticred-eye emission has not been set, control proceeds to step S418. On theother hand, if permission of automatic red-eye emission has been set,the CPU 115 a sets the red-eye emission request (step S417) and controlproceeds to step S418. At step S418, the CPU 115 a calculates theelectronic flash light quantity.

[Weak Emission Judgment Processing]

At step S419, the CPU 115 a judges whether a face has been detected inthe screen. As a result of this judgment, if a face has not beendetected in the screen, control proceeds to step S424. On the otherhand, if a face has been detected in the screen, it is judged whetherthe area of a portion judged to be a face is larger than a predeterminedvalue (step S420). As a result of this judgment, if the area of theportion judged to be a face is not larger than the predetermined value,control proceeds to step S424. On the other hand, if the area of theportion judged to be a face is larger than the predetermined value, theCPU 115 a judges whether a weak preset value has been set (step S421).This weak preset value is set on the user setup screen for recordingconditions described above (see FIG. 20). As a result of this judgment,when the weak preset value has been set, the CPU 115 a subtracts theweak preset value set by the user from the calculated electronicflashing quantity (step S422). When the weak preset value has not beenset, the CPU 115 a subtracts a predetermined weak preset value from thecalculated electronic flashing quantity (step S423).

Subsequently, at step S424, the CPU 115 a judges whether the red-eyeemission request has been set. As a result of this judgment, if thered-eye emission request has been set, the CPU 115 a performs thered-eye emission processing (step S425), and then performs the mainemission processing (step S426). On the other hand, if the red-eyeemission request has not been set, the CPU 115 a performs the mainemission processing (step S426) without performing the red-eye emissionprocessing.

As explained above, according to the third embodiment, the CPU 115 ajudges whether photographing of a human object is to be carried out, bydetecting a human face, and when photographing of a human object is tobe carried out and electronic flash is used, after the red-eyepreventing emission has been performed, the main emission is to becarried out. As a result, it can be judged automatically thatphotographing of a human object is to be carried out, and red-eyeemission can be performed automatically, thereby time and energy of auser for changing over to the red-eye emission mode can be omitted.

According to the third embodiment, it is judged whether photographing ofa human object is to be carried out by detecting a face. Whenphotographing of a human object is to be carried out, and electronicflash is used, a user can set whether the red-eye preventing emission isto be carried out automatically. As a result, if the user does not wantto use the red-eye emission, the user can inhibit the red-eye emission,thereby enabling photographing using a good shutter chance.

According to the third embodiment, when the ratio of the face occupyingin the screen is not smaller than a predetermined value, the CPU 115 ajudges that a close-up picture of a face is to be taken, and theelectronic flash light quantity is set weak. Therefore, blanking of aportion where the electronic flash light is strongly irradiated can beprevented. In this case, a user can set the quantity of the electronicflash light quantity to be weakened (user preset value), and hencephotographing using the electronic flash can be performed depending onthe situation.

According to the third embodiment, the CPU 115 a compares the brightnessat a position which has been judged as a face with the ambientbrightness, and when the brightness at the position which has beenjudged as a face is darker than the ambient brightness by apredetermined value or more, it is judged to be backlight, andelectronic flash is automatically used. As a result, even if a humanobject is not at the center of the screen, it becomes possible to usethe electronic flash for correcting the backlight.

According to the third embodiment, when it is judged to be backlight,the user can set whether to use the electronic flash. Therefore, theuser can select if backlight correction by the electronic flash is to beperformed, thereby enabling photographing corresponding to the user'sphotographing intention and the situation.

According to the third embodiment, the user can set whether facedetection operation is to be performed. Hence, the user can selectwhether face detection operation is to be performed, according to ifphotographing of a human object is to be performed or not. As a result,convenience of the user can be improved.

In the third embodiment, the face detection result of the face detectionprocessing may be informed to a user. For example, when a face has beendetected, the CPU 115 a displays a rectangular frame on the face portionof a human object, in the image data displayed on the liquid crystalmonitor 207, to thereby notify the user that a face has been detected.FIG. 23 shows a display example of image data (monitored image)displayed on the liquid crystal monitor 207, and FIG. 24 shows a displayexample when a rectangular frame A is displayed on the face portion ofthe human object in the image data shown in FIG. 23.

Fourth Embodiment

A digital camera according to a fourth embodiment will be explainedbelow, with reference to FIG. 33 to FIG. 31. In the fourth embodiment, adigital camera that performs photographing when face image of a subjectis recognized and each part of the face is judged, will be explained.

FIG. 25 is a block diagram of a digital camera according to the fourthembodiment. A digital camera 100 comprises, a lens 1 which collects anoptical image of a subject, a diaphragm section 2 which converges beamsof light collected by the lens 1, a motor driver 11 which shifts aplurality of lenses (not shown) for focusing or drives the diaphragmsection 2, a CCD (Charge Coupled Device) 3 which photoelectricallyexchanges an optical image which has passed through the lens 1 and thediaphragm section 2, a CDS (Correlated Double Sampling) 4 which reducesnoise included in the CCD 3, an A/D converter 5 which converts an analogsignal from the CCD 3 to a digital signal, a timing generator 13 whichgenerates timing for the CCD 3, the CDS 4 and the A/D converter 5, adigital signal processing circuit 7 which carries out image processingin accordance with the image processing parameter, a frame memory 6which stores the record of picked up pixels and the image-processedimage, a display section 8 which displays the picked up image on an LCD(Liquid Crystal Display), an image compression and expansion circuit 9which compresses image data having been processed by the digital signalprocessing circuit 7 or expands the image data to the original imagedata, a memory card 10 which stores image data compressed by the imagecompression and expansion circuit 9, a microcomputer 14 (hereinafter,referred to as an MC) which executes a predetermined control based onthe control program, an EEPROM (Electrically Erasable and ProgrammableRead Only Memory) 16 which stores parameters, a camera operation section17 which has a release button or the like for an operator to operate thecamera body, an OSD (On-Screen Display) 15 which monitors the number offilms and the emission state of the electronic flash, an electronicflash 12 for illuminating the subject, and a face recognition processor18 which performs recognition of a face image and judgment of eachportion in the face image. The lens 1, the diaphragm 2 and the CCD 3mainly constitute an image pickup unit, and the display section 8, thedigital signal processing circuit 7 and the MC 14 mainly constitute amonitoring unit, and the camera operation section 17 mainly constitutesa selection unit.

The outline of the operation of the digital camera 100 in thisconfiguration will be explained, with reference to FIG. 25. When anoperator looks at a subject through a finder (not shown), and pushes therelease button in the camera operation section 17, photographing iscarried out. Specifically, the MC 14 detects the signal, and allows themotor driver 11 to drive the lens 1 and the diaphragm section 2, tofocus the CCD 3 on the image of the subject. If necessary, theelectronic flash 12 is emitted. The series of operation is automaticallycarried out by the MC 14 based on the information from the sensor (notshown). The image brought into focus of the CCD 3 is taken outsequentially by a clock generated by the timing generator 13, and thenoise included in the data is reduced by the CDS4. Here, as the noiseincluded in the output signal of the CCD 3, reset noise is predominant.In order to reduce this noise, by subtracting a picture signal and resetnoise included in the signal period from each other, and a reset noiseincluded only in the field through period, the reset noises arecancelled. The analog signal is converted to a 10-bit digital signal bythe A/D converter 5, and the digital signal is input to the digitalsignal processing circuit 7, and temporarily stored in the frame memory6. In response to the instruction from the MC 14, the data temporarilystored in the frame memory 6 is processed by parameters stored in theEEPROM 16, and the processed image is stored again in the frame memory6. The white balance processing is included in this processing. Further,the data written in the frame memory 6 is transmitted to the controlsection in the display section 8, and the contents are displayed on theLCD.

The frame memory 6 is an image memory that can accumulate image data ofat least one screen of the picked up image, and it uses a commonly usedmemory, for example, VRAM (Video RandomAccess Memory), SRAM(StaticRandomAccess Memory), DRAM (Dynamic Random Access Memory) orSDRAM (Synchronous DRAM). When it is desired to record the image in thememory card 10, due to the intention of the operator, the MC 14 executescontrol of transferring the image to the memory card 10 with respect tothe digital signal processing circuit 7, in response to the instructionof the camera operation section 17. That is to say, the image-processedimage is read out from the frame memory 6, and transmitted to the imagecompression and expansion circuit 9. Here, the image is compressed bythe JPEG (Joint Photographic Experts Group) method, and stored in thememory card 10. ADCT (adaptive discrete cosine) is used for this codingalgorithm, and hierarchical coding is also employed in which an imagehaving low resolution is first coded, and gradually the resolutionbecomes high. As described above, the memory card 10 is for compressingthe image data stored in the frame memory 6, and storing the compresseddata. Alternatively, for example, the configuration may be such that thedata is recorded in an internal memory of about 8 MB or a smart mediacompact flash memory.

When the contents of the memory card 10 are displayed on the displaysection 8, or when it is desired to transfer the image data byconnecting with another PC by an external terminal, a desired memorycard is inserted to a connector (not shown) of the camera body, and aninstruction is given from the camera operation section 17. The MC 14then instructs the digital signal processing circuit 7 to read out thecompressed image data in the memory card, and the image data is input tothe image compression and expansion circuit 9, and expanded inaccordance with the expansion algorithm to be recovered, and the imageis displayed on the display section 8.

FIG. 26 is a schematic block diagram which shows a face recognitionprocessor 18 in FIG. 25. The face recognition processor 18 comprises animage memory 20 which stores one image of the subject, an image fetchsection 21 which takes an image from the image memory 20 to an othermemory or register in a predetermined unit, a control section 22 whichtakes charge of the overall control, a face characteristic storagesection 24 which stores a plurality of characteristics of a face, arecognition and judgment section 23 which recognizes a face from thedata from the image fetch section 21 and the data from the facecharacteristic storage section 24 and judges each portion, an edgedetector 26 which detects an edge detection value from the result datathereof, and an output section 25 which outputs the final judgmentresult to the outside. The image memory 20 may use the frame memory 6 inFIG. 25. The other portions may be realized by the MC 14 in FIG. 25, ormay be realized by a dedicated LSI. The recognition and judgment section23 and the face characteristic storage section 24 mainly constitute theface image recognition unit and the face portion judgment unit, and theedge detector 26 mainly constitutes the edge detection unit.

Before explaining detection of the face image, known face imagerecognition technique will be explained schematically. Face recognitionin the present invention needs not to be a level that can reliablyrecognize an individual face as in the conventional technique, and aneither-or recognition level for recognizing that the subject is a faceor other objects is sufficient. The object items in the face imagerecognition are largely divided into the following two items,

(1) Identification of human object, To identify who the human object is,and

(2) Identification of expression, To identify how the expression of thehuman object is.

In other words, it can be said that the identification of human objectof (1) is structural recognition of the face and statisticidentification. It can be said that the identification of expression isrecognition of shape change of the face, and dynamic identification. Itcan be said that the present invention is simpler identification thanthe above two. As these methods of identification, there are (1)two-dimensional method and (2) three-dimensional method, and in thecomputers, (1) two-dimensional method is mainly used. Detailed contentsthereof are omitted herein. As a method of identification of expression,there is a concept by means of the FACS (Facial Action unit System), andby using this, the expression can be expressed by using the position ofa characteristic point of the expression component.

Application of these techniques to an admission control system, a humanobject image database system, a recognition communication system and thelike can be considered in the future.

First Example

FIG. 27 is a flowchart which explains a first example of the digitalcamera. Explanation will be made, with reference to FIG. 27, togetherwith FIG. 25 and FIG. 26. The image data of the subject isphotoelectrically exchanged by the CCD 3 in FIG. 25 and image processed,and then stored in the image memory 20 in the face recognition processor18 in FIG. 26. The image data is taken into the image fetch section 21in a predetermined unit (frame, byte) (step S1). The image data is inputto the recognition and judgment section 23, and subjected to facerecognition and judgment of each portion of the face, from the data inthe face characteristic storage section 24 which stores various facecharacteristic data stored in advance. This recognition method iscarried out based on various algorithms. The result thereof istransmitted in detail to the control section 22, and the face image isrecognized (step S2), and each portion is judged from the data (stepS3). As a result, when the face image is recognized and each portion isjudged (YES route), the control section 22 outputs a result signal tothe output section 25, thereby the release button (not shown) in thecamera operation section 17 is automatically pushed (step S4). Thereby,photographing of the subject is carried out. On the other hand, when theface image is not detected at step S2 and step S3, or when each portionis not judged (NO route), the control section 22 outputs a result signalto the output section 25, and returns to step S1 to continue the faceimage recognition and judgment operation.

As described above, most probable subject of the camera is a humanobject. Therefore, when a human object is to be photographed, it isimportant to photograph without losing a shutter chance. For thispurpose, it has to be recognized that the subject is a human object. Themost suitable portion to identify a human object is a face. A clearimage can be photographed only when the face image is extracted from thesubject, and each part such as the eyes, the mouth, the nose and theeyebrows can be judged from the face image. Particularly, since thedigital camera stores the digitalized image data, analysis by thecomputer is easy. As a result, the operability is improved, and a clearimage can be photographed without losing a shutter chance.

Judgment of the face image is carried out by catching the outline of theface and features of shapes of the eyes, the nose, the eyebrows and theears. If it is to be judged simply as a face, the face can be judgedjust by catching the outline. However, in order to clearly photographthe whole face, it is necessary to continue the judgment operation untilall of the respective portions can be judged. Thereby, it is possible tophotograph a clear image.

Second Example

FIG. 28 is a flowchart which explains a second example of the digitalcamera. Explanation will be made, with reference to FIG. 28, togetherwith FIG. 25 and FIG. 26. The image data of the subject isphotoelectrically exchanged by the CCD 3 in FIG. 1 and image processed,and then stored in the image memory 20 in the face recognition processor18. The image data is taken into the image fetch section 21 in apredetermined unit (frame, byte) (step S10). The image data is input tothe recognition and judgment section 23, and subjected to facerecognition and judgment of each portion of the face, from the data inthe face characteristic storage section 24 which stores various facecharacteristic data stored in advance. This recognition method iscarried out based on various algorithms. The result thereof istransmitted in detail to the control section 22, and the face image isrecognized (step S11), and each portion is judged from the data (stepS12). As a result, when the face image is recognized and each portion isjudged (YES route), the control section 22 outputs a result signal tothe output section 25, compresses the image data and stores the imagedata in the memory card 10 (step S13). On the other hand, when the faceimage is not detected at step S11 and step S12, or when each portion isnot judged (NO route), the control section 22 outputs a result signal tothe output section 25, and returns to step S10 to continue the faceimage recognition and judgment operation.

The memory capacity of the memory is limited. Further, a photographermay select a necessary image from the image recorded in the memory ordelete an unnecessary image. At this time, when an unclear image isrecorded in the memory, this operation becomes complicated, and thememory is used wastefully. However, by storing the image data only whenall of the respective portions of the face image can be judged, theoperability is improved and wasteful use of the memory can be avoided.

Third Example

FIG. 29 is a flowchart which explains a third example of the digitalcamera. Explanation will be made, with reference to FIG. 29, togetherwith FIG. 25 and FIG. 26. The image data of the subject isphotoelectrically exchanged by the CCD in FIG. 1 and image processed,and then stored in the image memory 20 in the face recognition processor18. The image data is taken into the image fetch section 21 in apredetermined unit (frame, byte) (step S15). The image data is input tothe recognition and judgment section 23, and subjected to facerecognition and judgment of each portion of the face, from the data inthe face characteristic storage section 24 which stores various facecharacteristic data stored in advance. This recognition method iscarried out based on various algorithms. The result thereof istransmitted in detail to the control section 22, and the face image isrecognized (step S16), and each portion is judged from the data (stepS17). As a result, when the face image is recognized and each portion isjudged (YES route), the area is divided into each part of the face (stepS18), and the data is transmitted to the edge detector 26. The edgedetector 26 detects an edge for each area (step S19), and judges whetherthe edge in the eye area is not smaller than an edge threshold A (stepS20), judges whether the edge in the nose area is not smaller than anedge threshold B (step S21), and judges whether the edge in the moutharea is not smaller than an edge threshold C (step S22). If the resultsof all of these judgments are YES, the control section 22 outputs aresult signal to the output section 25, thereby the release button (notshown) in the camera operation section 17 is automatically pushed (stepS23). Thereby, photographing of the subject is carried out. On the otherhand, when the edges are less than the threshold, respectively, at stepS20, step S21 and step S22 (NO route), the control returns to step S15to continue the face image recognition and judgment operation and theedge detection operation.

As described above, features of respective portions of the face arecharacterized by the edge. Therefore, the edge in each portion has apeculiar threshold, and it is possible to judge by comparing the edgedetection value from the edge detector 26 with these thresholds.Thereby, control waits until the edge detection value exceeds thethreshold, or the operation of the edge detector 26 is continued. As aresult, a clear picture of the image of each portion can be reliablytaken.

In the above explanation, the edge detection operation is continueduntil the edge detection value exceeds the threshold. However, in thiscase, time may be required for the detection. Therefore, allowableranges may be given to the detection time and the threshold, and whenthe tolerance is exceeded, the image data may be fetched, or the releasebutton may be pushed to carry out photographing. Thereby, when the edgedetection value from the edge detector 26 exceeds a predeterminedthreshold for a predetermined period of time, the image data is fetched,or the release button is pushed, and hence the operation time isaccelerated.

Fourth Example

FIG. 30 is a flowchart which explains a fourth example of the digitalcamera. Explanation will be made, with reference to FIG. 30, togetherwith FIG. 25 and FIG. 26. The image data of the subject isphotoelectrically exchanged by the CCD in FIG. 1 and image processed,and then stored in the image memory 20 in the face recognitionprocessor. The image data is taken into the image fetch section 21 in apredetermined unit (frame, byte) (step S30). The image data is input tothe recognition and judgment section 23, and subjected to facerecognition and judgment of each portion of the face, from the data inthe face characteristic storage section 24 which stores various facecharacteristic data stored in advance. This recognition method iscarried out based on various algorithms. The result thereof istransmitted in detail to the control section 22, and the face image isrecognized (step S31), and each portion is judged from the data (stepS32). As a result, when the face image is recognized and each portion isjudged (YES route), it is displayed on the LCD in the display section 8in FIG. 1 that photographing is possible (step S33). When it is judgedNO at step S31 or step S32, it is judged whether predetermined time haspassed (step S34), and if the predetermined time has passed (YES route),it is displayed on the LCD in the display section 8 in FIG. 25 thatphotographing is not possible (step S35).

As described above, it is necessary for a photographer to recognize whenjudgment of the face image has finished. Therefore, it is preferablethat a liquid crystal display unit or the like be provided in thecamera. Thereby, when the conditions for photographing are satisfied,this matter is displayed on the display section 8. As a result, theshutter chance can be caught precisely, thereby improving theoperability. If the conditions for photographing are not satisfied, thismatter is displayed on the display section 8. As a result, thephotographer can carry out the subsequent operation quickly.

Fifth Example

FIG. 31 is a flowchart which explains a fifth example of the digitalcamera. Explanation will be made, with reference to FIG. 31, togetherwith FIG. 27 and FIG. 28. The image data of the subject isphotoelectrically exchanged by the CCD 3 in FIG. 1 and image processed,and then stored in the image memory 20 in the face recognition processor18. The image data is taken into the image fetch section 21 in apredetermined unit (frame, byte) (step S40). The image data is input tothe recognition and judgment section 23, and subjected to facerecognition and judgment of each portion of the face, from the data inthe face characteristic storage section 24 which stores various facecharacteristic data stored in advance. This recognition method iscarried out based on various algorithms. The result thereof istransmitted in detail to the control section 22, and the face image isrecognized (step S41), and each portion is judged from the data (stepS42). As a result, when the face image is recognized and each portion isjudged (YES route), a first warning sound is generated by a soundproducing device (not shown) in the camera operation section 17 in FIG.25 (step S43). If the judgment result is NO at step S41 or step S42, itis judged if predetermined time has passed (step S44), and whenpredetermined time has passed (YES route), a second warning sound isgenerated by the sound producing device (not shown) in the cameraoperation section 17 in FIG. 25 (step S45).

As described above, it is necessary for a photographer to recognize whenjudgment of the face image has finished. But the photographer does notalways watch the display section. Therefore, by judging by sound, itbecomes easy for the photographer to recognize. As a result, whenphotographing conditions are satisfied, sound is generated by the soundproducing device, and hence the user will not fail to notice thedisplay, thereby further improving the operability. After thepredetermined time has passed, when the photographing conditions are notsatisfied, the image pickup device generates sound by the soundproducing device. Thereby, the photographer can carry out the subsequentoperation quickly. If the sound producing device generates only one typeof sound, regardless of the warning content, it cannot be judged whichwarning it is. Therefore, it is preferable to change the sound dependingon the warning content. As a result, the warning content can be judged,thereby further improving the operability.

In the explanation above, the photographer does not always photograph ahuman object, or there is a human object which the photographer does notwant to photograph. Therefore, if the photographer can select either ofautomatic pressing of the release button and manual pressing thereof,the operability of the photographer can be further improved.

Fifth Embodiment

A digital camera according to a fifth embodiment will be explainedbelow, with reference to FIG. 25 and FIG. 32 to FIG. 36. In the fifthembodiment, such a digital camera that face image is judged, to therebycut out a face image whose size and inclination are automaticallycorrected, and the cut out face image is stored as a separate image filewill be explained. The block configuration of the digital cameraaccording to the fifth embodiment is the same as that of the fourthembodiment (FIG. 25), and the common portions will not be explainedhere, and only a different portion will be explained.

FIG. 32 is a schematic block diagram of the face recognition processor18 in FIG. 25. As shown in FIG. 32, the face recognition processor 18comprises, an image memory 20 which stores one image of the subject, animage fetch section 21 which takes an image from the image memory 20 toanother memory or register in a predetermined unit, a control section 22which takes charge of the overall control, a face characteristic storagesection 24 which stores a plurality of characteristics of a face, arecognition and judgment section 23 which recognizes a face from thedata from the image fetch section 21 and the data from the facecharacteristic storage section 24 and judges each portion, a face imagecutting section 30 which cuts out a predetermined face image from theresult data, and an output section 25 which outputs the final judgmentresult to the outside. The image memory 20 may use the frame memory 6 inFIG. 25. The other portions may be realized by the MC 14 in FIG. 25, ormay be realized by a dedicated LSI. The recognition and judgment section23 and the face characteristic storage section 24 mainly constitute theface image recognition unit and the face portion judgment unit.

FIG. 33 is a flowchart which explains the operation of the digitalcamera according to the fifth embodiment. FIG. 34 to FIG. 36 arediagrams which show a face image. The operation of the digital cameraaccording to the fifth embodiment will be explained based on theflowchart in FIG. 33, with reference to FIG. 34 to FIG. 36.

In FIG. 33, the image data of the subject is photoelectrically exchangedby the CCD 3 in FIG. 1(?) and image processed, and then stored in theimage memory 20 in the face recognition processor 18 shown in FIG. 34.The image data is taken into the image fetch section 21 in apredetermined unit (frame, byte) (step S101). The image data is input tothe recognition and judgment section 23, and subjected to facerecognition and judgment of each portion of the face, from the data inthe face characteristic storage section 24 which stores various facecharacteristic data stored in advance. This recognition method iscarried out based on various algorithms. The result thereof istransmitted in detail to the control section 22, and the face image isrecognized (step S102), and each portion (eyes, nose and mouth) isjudged from the data (step S103). As a result, when the face image isrecognized and each portion is judged (YES route), control proceeds tostep S104.

The control section 22 divides the area of a face image 1 for each part.Specifically, as shown in FIG. 34, the control section 22 divides theface image into three parts, that is, mouth part 3, nose part 4, and eyepart 5 (step S104). The control unit 22 then figures out center A of themouth, center B of the nose and center C of the eyes (step S105), andcalculates a straight line 2 closest to the three points A, B and C(step S106). The straight line 2 is cut out so that it becomes parallelwith the vertical direction of a frame 14 of the cut out image. Asdescribed above, the most suitable portion for identifying a humanobject is a face, and hence a face image 1 is extracted from the subjectimage, and only when the respective parts such as the mouth 3, the nose4 and the eyes 5 are judged from the face image, a clear image can bephotographed. The respective parts are arranged substantiallysymmetrically with respect to the central line 2 of the face. Therefore,if the straight line 2 connecting the central points A, B and C of therespective parts is cut out so as to be parallel with the verticaldirection of the frame 14 of the face image 1, the face can be cut outwithout being inclined.

As shown in FIG. 35, right and left blank spaces 8 and 9 are determinedfrom the size of the face image 1, to figure out vertical cutout borders6 and 7 (step S107). Subsequently, as shown in FIG. 38, top and bottomblank spaces 10 and 11 are determined from the size of the face image 1,to figure out horizontal cutout borders 12 and 13 (step S108). The faceimage 1 is then cut out along the cutout borders 6, 13, 7 and 12 figuredout at steps S107 and S108 (step S109).

The most important point in the photograph for certificate is that theimage quality is high and it is well balanced between the background andthe face in the image face. The balance is determined by a ratio betweenthe blank spaces right and left and top and bottom and the face on theface image face to be cut out. In general, the right and left blankspaces 8 and 9 are made equal, and the top and bottom blank spaces 10and 11 are determined such that the bottom blank space 11 is made largerthan the top blank space 10. This is because there are a neck and abreast at the bottom. As described above, since the blank spaces rightand left and top and bottom in the face image face to be cut out are ata certain ratio with respect to the size of the face photographed on theface image face to be cut out, a well-balanced photograph can beproduced.

A file of the cut out face image is prepared (step S110), and a file ofthe original image (photographed image) is prepared (step S111). Whenthe cut out face image and the original image are filed, it is desiredto associate these files with each other. As a method therefor, forexample, there can be used a method in which the same file name is giventhereto, but the type or extension is changed, such that the originalimage is named as Rimg0001.jpg, and the face image is named asRimg0001.tif. The image file name is formed by 8 characters, and theupper 4 characters may be formed by optional alphabets or figures, andthe lower 4 characters may be formed by figures. Further, there may beadopted a method in which the upper 4 characters may be differentbetween the original image and the face image, and the lower 4characters may be the same value (original image, Rimg0001.jpg, faceimage, Rpic0001.jpg). As a result, the data of the recognized face imageface and the data of the face image face cut out from the face imageface are stored as files based on a predetermined relation, and henceorganizing the original data and the cut out face data becomes easy.

The feature of the photographs for certificate is that the background ispainted in a particular color. This is because the human object becomesremarkable thereby. However, when preparing a photograph for certificatefrom a normal photograph, in many cases, some background isphotographed. Therefore, the background may be painted in apredetermined color. The face image referred to herein indicates also abody portion integral with the face.

If the image area to be cut out on the display section 8 can be madevisual, the cut out area can be recognized most clearly. Therefore, itis desired to display the face image area to be cut out by a frame. As aresult, the cut out area can be clearly recognized, and the operabilityis improved.

The photographed image and the cut out image are not always necessaryimages. Therefore, the configuration may be such that at this time, auser observes these images on the display section 8, and can selectrecording or deletion by the camera operation section 17. As a result,the operability can be improved, and the effective use of the memorybecomes possible.

As described above, the most important point in the photograph forcertificate is that the image quality is high and it is well balancedbetween the background and the face in the image face. Particularly, oneindex for judging the quality of the image is the area of the face. Thatis, it can be said that as this area increases, the image qualitybecomes better. Since the pixel density per unit area of the CCD, whichphotoelectrically exchanges the image, is constant, as this areaincreases, the sum total of number of pixels increases. Therefore, sincethe area and the image quality are in a proportional relation, the areaof the face can be determined by the sum total of number of pixels whichare occupied by the area, and hence the image quality can be judgedaccurately by a simple control. Therefore, when the area of the face inthe image (image for one frame) displayed on the display section 8 issmaller than a predetermined area, this image may not be recorded.Thereby, wasteful use of the memory can be prevented, thereby it can beprevented to take a picture for certificate of poor quality.

According to the image pickup device of a first aspect, in an imagepickup device which has an automatic focusing function, the image pickupdevice comprises, an image pickup unit which inputs image datacorresponding to a subject, a face detection unit which detects a humanface from the image data input from the image pickup unit, and anautomatic focusing control unit which performs automatic focusingcontrol, designating at least a part of the human face detected by theface detection unit as a ranging area. Therefore, the automatic focusingoperation can be executed by designating the human face in the screen asa ranging area, to bring the human face into focus, regardless of theposition of the human object in the screen. As a result, photographingof the human object becomes possible, without changing the compositionbetween at the time of the automatic focusing operation and at the timeof photographing.

According to the image pickup device of a second aspect, since anotification unit for notifying a user that a human face has beendetected by the face detection unit is provided, it becomes possible tonotify the user of the judgment result of face detection, so that theuser can confirm whether the face detection has a malfunction, and hencephotographing error by the user can be prevented, in addition to theeffect of the invention according to the first aspect.

According to the image pickup device of a third aspect, when a pluralityof faces are detected by the face detection unit, the automatic focusingcontrol unit carries out the automatic focusing control, designating atleast a part of the face closest to the central portion as the rangingarea. Hence, a main subject can be brought into focus at a highprobability. Even in an aggregate photograph, it is possible to increasethe possibility that faces at the front, back, right, and left of theface in the center are also brought into focus at a high probability.

According to the image pickup device of a fourth aspect, the imagepickup device comprises a ranging area selection unit by which, when aplurality of faces are detected by the face detection unit, a userselects the ranging area from the faces, and the automatic focusingcontrol unit carries out the automatic focusing control, based on theranging area selected by the ranging area selection unit. As a result,it is possible for a user to select which human object is to be focused.

According to the image pickup device of a fifth aspect, the image pickupdevice comprises a face detection operation setup unit, by which a usersets permission/inhibition of the face detection operation of the facedetection unit. When permission of the face detection operation of theface detection unit is set by the face detection operation setup unit,the automatic focusing control unit allows the face detection unit toexecute the face detection operation, to thereby perform the automaticfocusing control by designating at least a part of the detected humanface as the ranging area. On the other hand, when inhibition of the facedetection operation of the face detection unit is set by the facedetection operation setup unit, the automatic focusing control unitcarries out the automatic focusing control, without allowing the facedetection unit to execute the face detection operation. As a result, theuser sets permission/inhibition of the face detection operation, andhence unnecessary face detection operation can be omitted, therebyenabling prompt photographing.

According to the image pickup device of a sixth aspect, the image pickupdevice comprises a mode setup unit which sets a first photographing modefor performing automatic focusing by executing the face detectionoperation of the face detection unit, or a second photographing mode forperforming automatic focusing without executing the face detectionoperation of the face detection unit. When the first photographing modeis set by the mode setup unit, the automatic focusing control unitallows the face detection unit to execute the face detection operation,to thereby perform automatic focusing control by designating at least apart of the detected human face as the ranging area. On the other hand,when the second photographing mode is set by the mode setup unit, theautomatic focusing control unit carries out the automatic focusingcontrol, without allowing the face detection unit to execute the facedetection operation. As a result, when the automatic focusing is to beperformed, the human object photographing and the landscapephotographing can be easily discriminated, by dividing the mode into aphotographing mode in which face recognition is performed (firstphotographing mode) and a photographing mode in which face recognitionis not performed (second photographing mode).

According to the image pickup device of a seventh aspect, when a humanface is detected, the face detection unit further detects eyes, and whenthe eyes are detected by the face detection unit, the automatic focusingcontrol unit carries out the automatic focusing control, designating atleast a part of the eyes as the ranging area. As a result, it ispossible to take a picture in which the eyes are focused.

According to the image pickup device of an eighth aspect, when a humanface is detected, the face detection unit further detects the eyes, anose and a mouth, and the image pickup device further comprises a secondranging area selection unit, by which when the eyes, the nose and themouth are detected by the face detection unit, a user selects theranging area from the eyes, the nose and the mouth. The automaticfocusing control unit carries out the automatic focusing control, basedon the ranging area selected by the second ranging area selection unit.Therefore, the user can bring a portion of a face into focus, where theuser wants to focus, and hence the user's intention for photographingcan be reflected.

According to the image pickup device of a ninth aspect, the automaticfocusing control unit performs automatic focusing control by setting thesize of the ranging area, based on the size of the human face detectedby the face detection unit. As a result, it is possible to improve thefocusing accuracy.

According to the image pickup device of a tenth aspect, the image pickupdevice further comprises a ranging area size selection unit for a userto select the size of the ranging area. The automatic focusing controlunit performs the automatic focusing control by setting the ranging areaof a size selected by the ranging area size selection unit. As a result,the focusing accuracy can be improved, when a particular portion in theface is brought into focus.

According to the image pickup device of an eleventh aspect, every timethe automatic focusing control unit performs the automatic focusingcontrol, designating at least apart of the human face detected by theface detection unit as the ranging area, the automatic focusing controlunit stores the ranging result in a memory, and predicts the nextfocusing position from the past ranging results stored in the memory. Asa result, the next focusing position is predicted from the past focusingposition, and focusing can be performed promptly, thereby enablingprompt photographing.

According to an automatic focusing method of a twelfth aspect, themethod comprises, an image input step of inputting image datacorresponding to a subject, a face detection step of detecting a humanface from the image data input at the image input step, and an automaticfocusing control step of performing automatic focusing control,designating at least a part of the human face detected at the facedetection step as a ranging area. Therefore, by executing the automaticfocusing operation, designating the human face in the screen as theranging area, the human face can be brought into focus, regardless ofthe position of the human object in the screen. As a result,photographing of a human object becomes possible, without changing thecomposition between at the time of the automatic focusing operation andat the time of photographing.

According to a program to be executed by a computer according to athirteenth aspect, a computer executes the program to realize an imageinput step of inputting image data corresponding to a subject, a facedetection step of detecting a human face from the image data input atthe image input step, and an automatic focusing control step ofperforming automatic focusing operation, designating at least a part ofthe human face detected at the face detection step as a ranging area.Therefore, by executing the program by a computer, automatic focusingoperation is executed, designating the human face in the screen as theranging area, the human face can be brought into focus, regardless ofthe position of a human object in the screen. As a result, photographingof the human object becomes possible, without changing the compositionbetween at the time of the automatic focusing operation and at the timeof photographing.

According to an image pickup device of a fourteenth aspect, in an imagepickup device which has an automatic exposure function, the devicecomprises, an image pickup unit which inputs image data corresponding toa subject, a face detection unit which detects a human face from theimage data input from the image pickup unit, a photometric unit whichmeasures optical intensity, designating the human face detected by theface detection unit as a photometric area, and an exposure control unitwhich calculates the exposure based on the photometric result of thehuman face by the photometric unit, and performs exposure control basedon the calculated exposure. As a result, it is possible to properlyexpose the human object, regardless of the position and range of thehuman object in the screen.

According to the image pickup device of a fifteenth aspect, thephotometric unit further measures the optical intensity by designatingthe whole screen as the photometric area, and the exposure control unitcalculates the exposure by giving more weight to the photometric resultof the human face compared with the photometric result of the wholescreen, based on the photometric result of the human face and thephotometric result of the whole screen by the photometric unit. As aresult, it is possible to properly expose the background as well as thehuman object.

According to the image pickup device of a sixteenth aspect, the exposurecontrol unit selects either of a first photometric method in which theexposure is calculated based on the photometric result of the humanface, and a second photometric method in which the exposure iscalculated by giving more weight to the photometric result of the humanface compared with the photometric result of the whole screen, based onthe photometric result of the human face and the photometric result ofthe whole screen, corresponding to the ratio of the face occupying inthe screen or the position of the face or both. As a result, it becomespossible to prevent insufficient exposure for both the human object andthe background.

According to the image pickup device of a seventeenth aspect, the devicefurther comprises a photometric method selection unit, by which a usercan select either of the first photometric method in which the exposureis calculated based on the photometric result of the human face, and thesecond photometric method in which the exposure is calculated by givingmore weight to the photometric result of the human face compared withthe photometric result of the whole screen, based on the photometricresult of the human face and the photometric result of the whole screen.Therefore, the user can select which is given much weight to either thephotometric result of the whole screen or the photometric result of theface portion. As a result, the user's intention for photographing can bereflected.

According to the image pickup device of an eighteenth aspect, the devicecomprises a weighting setup unit, by which a user sets weighting to thephotometric result of the human face with respect to the photometricresult of the whole screen. Therefore, when the exposure is adjustedbased on the photometric result of the human face and the photometricresult of the whole screen, the user's intention for photographing canbe reflected.

According to the image pickup device of a nineteenth aspect, theexposure control unit sets weighting to the photometric result of thehuman face with respect to the photometric result of the whole screen,based on the ratio of the face occupying in the screen or the positionof the face or both. Therefore, if the ratio of the face occupying inthe screen is large, weighting to the photometric result of the faceportion is increased, and if the ratio of the face occupying in thescreen is small, weighting to the photometric result of the face portionis decreased, thereby enabling well-balanced exposure between the faceand the background.

According to the image pickup device of a twentieth aspect, the devicecomprises a face detection operation setup unit, by which a user setspermission/inhibition of the face detection operation of the facedetection unit. When permission of the face detection operation of theface detection unit is set, the exposure control unit allows the facedetection unit to execute the face detection operation, to therebyperform the exposure control based on the photometric result of thedetected human face. When inhibition of the face detection operation ofthe face detection unit is set, the exposure control unit performs theexposure control, without allowing the face detection unit to executethe face detection operation. As a result, the user can inhibit facedetection, thereby the user can prevent execution of unnecessary facedetection.

According to the image pickup device of a twenty-first aspect, thedevice comprises a mode setup unit for setting a first photographingmode in which exposure control is performed by executing the facedetection operation of the face detection unit, or a secondphotographing mode in which exposure control is performed withoutexecuting the face detection operation of the face detection unit. Whenthe first photographing mode is set, the exposure control unit allowsthe face detection unit to execute the face detection operation, tothereby perform exposure control based on the photometric result of thedetected human face. When the second photographing mode is set, theexposure control unit performs exposure control without allowing theface detection unit to execute the face detection operation. As aresult, by changing the photographing mode, the user can easily selectacceptance or refusal of the face detection, and hence photographingsuitable for the application of the user can be performed.

According to the image pickup device of a twenty-second aspect, since anotification unit for notifying a user of the detection result of thehuman face by the face detection unit is provided, the user can judgewhether the face detection has been operated normally. When amalfunction occurs, photographing is stopped, thereby a photographingfailure can be prevented.

According to the image pickup device of a twenty-third aspect, thenotification unit is a monitor screen for displaying the image data.Therefore, it becomes possible to notify the user of the result of theface detection operation, such as the face in the screen and theposition and range of the detected face, on the monitor screen.

According to the image pickup device of a twenty-fourth aspect, thenotification unit is a sub-LCD for displaying the operation condition orthe like of the image pickup device. As a result, in the image pickupdevice according to the ninth aspect, it becomes possible to notify auser of the face detection result in a cheap configuration.

According to the image pickup device of a twenty-fifth aspect, since thenotification unit is an LED, in an image pickup device which has nomonitor screen or even when the user does not use the monitor screen inan image pickup device which has a monitor screen, it becomes possibleto notify the user of the face detection result.

According to the image pickup device of a twenty-sixth aspect, when ahuman face cannot be detected by the face detection unit, the exposurecontrol unit performs exposure control based on the photometric resultof another photometric method. Therefore, in addition to the effect ofthe image pickup device according to the first aspect, even if a facecannot be detected, photographing as good as the conventional imagepickup device is made possible, without causing a big failure.

According to the exposure control method of a twenty-seventh aspect,there are provided, an image input step of inputting image datacorresponding to a subject, a face detection step of detecting a humanface from the image data input at the image input step, a photometricstep of measuring optical intensity, designating the human face detectedat the face detection step as a photometric area, and an exposurecontrol step of calculating the exposure based on the photometric resultof the human face at the photometric step, and performs exposure controlbased on the calculated exposure. As a result, it becomes possible toproperly expose a human object, regardless of the position and range ofthe human object in the screen.

According to the program to be executed by a computer according to atwenty-eighth aspect, the computer executes the program to realize, animage input step of inputting image data corresponding to a subject, aface detection step of detecting a human face from the image data inputat the image input step, a photometric step of measuring opticalintensity, designating the human face detected at the face detectionstep as a photometric area, and an exposure control step of calculatingthe exposure based on the photometric result of the human face at thephotometric step, and performing exposure control based on thecalculated exposure. As a result, it becomes possible to properly exposea human object, regardless of the position and range of the human objectin the screen.

According to the image pickup device of a twenty-ninth aspect, in animage pickup device provided with an electronic flash function, thedevice comprises, an image pickup unit which inputs image datacorresponding to a subject, a face detection unit which detects a humanface from the image data input from the image pickup unit, an electronicflashing unit for emitting electronic flash light, and an electronicflash control unit which controls the electronic flashing unit based onthe detection result of the human face by the face detection unit. As aresult, there is the effect that it is judged whether a human object isto be photographed, and light emission suitable for the human objectphotographing can be automatically carried out.

According to the image pickup device of a thirtieth aspect, when a humanface is detected by the face detection unit, the electronic flashcontrol unit allows the electronic flashing unit to perform red-eyepreventing emission, and then to perform the main emission. As a result,there is the effect that it is automatically judged whether a humanobject is to be photographed, to automatically perform the red-eyepreventing emission, and hence it is not necessary for a user to changeto the red-eye emission mode.

According to the image pickup device of a thirty-first aspect, thedevice comprises a red-eye preventing emission mode setup unit, by whicha user sets a red-eye preventing emission mode in which red-eyepreventing emission is carried out. When the red-eye preventing emissionmode is set by the red-eye preventing emission mode setup unit, and whena human face is detected by the face detection unit, the electronicflash control unit allows the electronic flashing unit to performred-eye preventing emission, and then to perform the main emission. Whenthe red-eye preventing emission mode is not set by the red-eyepreventing emission mode setup unit, and when a human face is detectedby the face detection unit, the electronic flash control unit allows theelectronic flashing unit to perform only the main emission, withoutallowing the electronic flashing unit to perform the red-eye preventingemission. Therefore, the user can select whether the red-eyephotographing is to be performed or not, and when the user does not wantto carry out the red-eye emission, the user can inhibit the red-eyeemission. As a result, there is the effect that photographing using agood shutter chance becomes possible.

According to the image pickup device of a thirty-second aspect, when ahuman face is detected by the face detection unit, and when a ratio ofthe face occupying in the screen is not smaller than a predeterminedvalue, the electronic flash control unit sets the electronic flash lightquantity of the electronic flashing unit to a weak level. Therefore,there is the effect that when a ratio of the face occupying in thescreen is not smaller than a predetermined value, it is judged thatclose-up of a face is to be shot, and the electronic flash lightquantity is set to a weak level, thereby preventing a blanking whichoccurs because the electronic flashlight is irradiated on the facestrongly.

According to the image pickup device of a thirty-third aspect, since thedevice comprises a weak emission quantity setup unit, by which a usersets a quantity to weaken the electronic flash light quantity.Therefore, there is the effect that the user can set the quantity toweaken the electronic flash light, thereby enabling photographingcorresponding to the situation.

According to the image pickup device of a thirty-fourth aspect, thedevice comprises a backlight judgment unit which compares the brightnessof the face portion detected by the face detection unit with the ambientbrightness, and judges to be backlight when the brightness of the faceportion is darker than the ambient brightness by at least apredetermined value. When it is judged to be backlight by the backlightjudgment unit, the electronic flash control unit allows the electronicflashing unit to emit electronic flash light. Therefore, even if a humanobject is not in the center of the screen, it can be judged to bebacklight, and hence there is the effect that electronic flash light canbe emitted for correcting the backlight.

According to the image pickup device of a thirty-fifth aspect, thedevice comprises a backlight electronic flash setup unit, by which auser sets whether the electronic flashing unit is allowed to emitelectronic flash light, when it is judged to be backlight by thebacklight judgment unit. As a result, there is the effect that the usercan select whether backlight correction is to be performed by theelectronic flash light, and hence it becomes possible to correspond tothe user's intention for photographing and the situation.

According to the image pickup device of a thirty-sixth aspect, thedevice comprises a face detection operation setup unit, by which a usersets whether the electronic flashing unit is to be controlled, based onthe detection result of the human face by the face detection unit.Therefore, there is the effect that the user can inhibit the facedetection operation, thereby enabling photographing corresponding to thesituation.

According to the image pickup device of a thirty-seventh aspect, thedevice comprises a notification unit for notifying a user of thedetection result of a human face by the face detection unit. Therefore,the user can judge whether the face recognition processing has beenoperated normally, and if a malfunction occurs, photographing isstopped. As a result, there is the effect that a photographing failurecan be prevented.

According to an electronic flash control method of a thirty-eighthaspect, the method comprises an image input step of inputting image datacorresponding to a subject, a face detection step of detecting a humanface from the image data input by the image pickup unit, and anelectronic flash control step of controlling the electronic flashingunit for emitting the electronic flash light, based on the detectionresult of a human face at the face detection step. As a result, there isthe effect that it is automatically judged whether a human objectphotographing is to be performed, to automatically perform lightemission suitable for human object photographing.

According to a program to be executed by a computer according to athirty-ninth aspect, the computer executes the program to realize animage input step of inputting image data corresponding to a subject, aface detection step of detecting a human face from the image data inputby the image pickup unit, and an electronic flash control step ofcontrolling the electronic flashing unit for emitting the electronicflash light, based on the detection result of a human face at the facedetection step. As a result, there is the effect that it isautomatically judged whether a object photographing is to be performed,to automatically perform light emission suitable for human objectphotographing.

According to the image pickup device of a fortieth aspect, when eachportion in the face image can be judged by the face portion judgmentunit, a release button for executing photographing of the subject isautomatically pressed, or the photographing operation is carried out. Asa result, the operability is improved, and a clear image can bephotographed, without losing a shutter chance.

According to the image pickup device of a forty-first aspect, when allof the respective portions in the face image cannot be judged, theoperation of the face portion judgment unit is continued until all ofthe respective portions in the face image can be judged. As a result, aclear image can be photographed.

According to the image pickup device of a forty-second aspect, only whenall of the respective portions in the face image can be judged, theimage data is stored. As a result, the operability is improved, andwasteful use of the memory can be eliminated.

According to the image pickup device of a forty-third aspect, controlwaits until the edge detection value exceeds the threshold, or theoperation of the edge detection unit is continued, until the edgedetection value exceeds the threshold. As a result, an image of eachportion can be clearly photographed reliably.

According to the image pickup device of a forty-fourth aspect, when theedge detection value of the edge detection unit exceeds a predeterminedthreshold for a predetermined period of time, the image data is takenin, or the release button is pressed. As a result, the operation timebecomes fast.

According to the image pickup device of a forty-fifth aspect, whenphotographing conditions are satisfied, this matter is displayed on thedisplay unit. As a result, a shutter chance can be caught precisely,thereby improving the operability.

According to the image pickup device of a forty-sixth aspect, when thephotographing conditions are not satisfied, this matter is displayed onthe display unit. As a result, the operation to be taken next by thephotographer can be taken quickly.

According to the image pickup device of a forty-seventh aspect, when thephotographing conditions are satisfied, sound is generated by thewarning unit. As a result, a user does not fail to notice the display,thereby further improving the operability.

According to the image pickup device of a forty-eighth aspect, thewarning unit generates sound, when the photographing conditions are notsatisfied after a predetermined period of time has passed. As a result,the operation to be taken next by the photographer can be taken quickly.

According to the image pickup device of a forty-ninth aspect, afrequency or a melody of the sound is changed when the image pickupdevice satisfies the photographing conditions or does not satisfy thephotographing conditions. As a result, the warning contents can bejudged, thereby further improving the operability.

According to the image pickup device of a fiftieth aspect, when it isselected not to press the release button by the selection unit, therelease button is to be pressed manually. Therefore, the operability ofthe operator is further improved.

According to the image pickup device of a fifty-first aspect, when theface image is recognized by the face image recognition unit, the faceimage portion is cut out and stored as a separate image file. As aresult, even if the face is at the edge of the image at the time ofphotographing, a photograph for certificate can be produced therefrom.

According to the image pickup device of a fifty-second aspect, the faceimage portion is cut out so that a straight line connecting thesubstantial central points of each portion of the face becomes parallelwith the vertical direction of an image frame to be cut out. As aresult, the image can be cut out without the face being inclined.

According to the image pickup device of a fifty-third aspect, since theblank spaces right and left and top and bottom in the cut out face imageface are at a certain ratio with respect to the size of the face pickedup on the face image face to be cut out, a well-balanced photograph canbe produced.

According to the image pickup device of a fifty-fourth aspect, the dataof the recognized face image face and the data of the face image facecut out from the face image face are stored as a file, based on apredetermined relation. As a result, organizing the original data andthe cut out face data becomes easy.

According to the image pickup device of a fifty-fifth aspect, sinceportions other than the cut out face image are painted over by apredetermined color, the human object can be made more remarkable.

According to the image pickup device of a fifty-sixth aspect, when theface image face is to be cut out, the face image face area to be cut outis displayed by a frame. As a result, the area to be cut out can berecognized clearly, thereby improving the operability.

According to the image pickup device of a fifty-seventh aspect, sincerecording or deletion of the image can be selected by the selectionunit, the operability can be improved and the effective use of thememory can be realized.

According to the image pickup device of a fifty-eighth aspect, when thearea of the face occupying in the photographed image is smaller than apredetermined area, the image is not recorded. As a result, wasteful useof the memory can be prevented, and a photograph for certificate havinga poor quality can be prevented from being taken.

According to the image pickup device of a fifty-ninth aspect, the areaof the face is determined by a sum total of the number of pixelsoccupied by the area. As a result, the image quality can be accuratelyjudged by simple control.

The present document incorporates by reference the entire contents ofJapanese priority documents, 2001-284162 filed in Japan on Sep. 18,2001, 2001-284163 filed in Japan on Sep. 18, 2001, 2001-304342 filed inJapan on Sep. 28, 2001, 2001-304638 filed in Japan on Sep. 28, 2001 and2001-304343 filed in Japan on Sep. 28, 2001.

Although the invention has been described with respect to a specificembodiment for a complete and clear disclosure, the appended claims arenot to be thus limited but are to be construed as embodying allmodifications and alternative constructions that may occur to oneskilled in the art which fairly fall within the basic teaching hereinset forth.

What is claimed is:
 1. An image pickup device provided with an automaticfocusing function, comprising: an image pickup unit configured to pickup image data corresponding to a subject; a display unit configured todisplay the image data picked up by the image pickup unit; a facedetection unit configured to detect a human face from the image datapicked up by the image pickup unit; a notification unit configured tonotify a user that the human face is detected by displaying a framearound a part of the human face within the image data displayed on thedisplay unit, when the human face is detected by the face detectionunit; and an automatic focusing control unit configured to perform anautomatic focusing control based on contrast information within aranging area, the ranging area being an area within the frame displayedon the human face detected by the face detection unit by thenotification unit, a size of the ranging area being larger than that ofthe human face, the automatic focusing control unit configured tocompare a size of the human face with a predetermined first size and setthe first size to be the ranging area if the human face is smaller thanor equal to the first size, and set a second size larger than the firstsize to be the ranging area if the human face is larger than the firstsize.
 2. The image pickup device according to claim 1, wherein theautomatic focusing control unit carries out the automatic focusingcontrol by designating at least a part of the human face close to acentral portion of the image data as the ranging area, when a pluralityof human faces is detected by the face detection unit.
 3. The imagepickup device according to claim 1, wherein the automatic focusingcontrol unit further comprises a ranging area selection unit configuredto allow the user to select the ranging area from a plurality of humanfaces, when the plurality of human faces is detected, and the automaticfocusing control unit carries out the automatic focusing control basedon the ranging area selected by the ranging area selection unit.
 4. Theimage pickup device according to claim 1, further comprising: a modesetup unit configured to set a mode by switching a human photographingmode from/to a landscape photographing mode, the human photographingmode being a mode for photographing a human and the landscapephotographing mode being a mode for photographing a landscape, whereinwhen the mode setup unit sets the human photographing mode, the modesetup unit causes the face detection unit to execute a face detectionoperation, and the auto focusing control unit carries the auto focusingcontrol by designating the detected human face as the ranging area, andwhen the mode setup unit sets the landscape photographing mode, the modesetup unit does not cause the face detection unit to execute the facedetection operation, and the auto focusing control unit carries the autofocusing control based on a predetermined ranging area.
 5. An imagepickup device provided with an automatic focusing function, comprising:an image pickup unit configured to pick up image data corresponding to asubject; a face detection unit configured to detect a human face fromthe image data picked up by the image pickup unit; and an automaticfocusing control unit configured to perform an automatic focusingcontrol by designating the human face detected by the face detectionunit as a ranging area, wherein the automatic focusing control unitcarries the automatic focusing control by setting a size of the rangingarea based on a size of the human face detected by the face detectionunit, the automatic focusing control unit configured to compare a sizeof the human face with a predetermined first size and set the first sizeto be the ranging area if the human face is smaller than or equal to thefirst size, and set a second size larger than the first size to be theranging area if the human face is larger than the first size.
 6. Theimage pickup device according to claim 5, wherein the automatic focusingcontrol unit compares the size of the human face detected by the facedetection unit with a predetermined value, and when the size of thedetected human face is smaller than the predetermined value, theautomatic focusing control unit sets a first ranging area having a firstsize and carries the automatic focusing control based on contrastinformation within the first ranging area, and when the size of thedetected human face is equal to or larger than the predetermined value,the automatic focusing control unit sets a second ranging area having asecond size larger than the first size and carries the automaticfocusing control based on contrast information within the second rangingarea.
 7. The image pickup device according to claim 5, furthercomprising: a displaying unit configured to display the image datapicked up by the image pickup unit; and a notification unit configuredto notify a user that the human face is detected by displaying a framearound a part of the human face within the image data displayed on thedisplay unit, when the human face is detected by the face detectionunit.
 8. The image pickup device according to claim 5, wherein theautomatic focusing control unit carries out the automatic focusingcontrol by designating at least a part of the human face close to acentral portion of the image data as the ranging area, when a pluralityof human faces is detected by the face detection unit.
 9. The imagepickup device according to claim 5, further comprising: a mode setupunit configured to set a mode by switching a human photographing modefrom/to a landscape photographing mode, the human photographing modebeing a mode for photographing a human and the landscape photographingmode being a mode for photographing a landscape, wherein when the modesetup unit sets the human photographing mode, the mode setup unit causesthe face detection unit to execute a face detection operation, and theauto focusing control unit carries the auto focusing control bydesignating the detected human face as the ranging area, and when themode setup unit sets the landscape photographing mode, the mode setupunit does not cause the face detection unit to execute the facedetection operation, and the auto focusing control unit carries the autofocusing control based on a predetermined ranging area.
 10. The imagepickup device according to claim 5, wherein the automatic focusingcontrol unit sets the size of the ranging area to be larger than that ofthe human face.